So my setup is the following:
- A static website (mkdocs) deployed at
https://sub.domain.com/folder/
in Azure Blob storage, running on Kestrel. - testing locally at
localhost:port
without a subdomain and folder. <link rel="manifest" type="application/manifest+json" href="manifest.json" crossorigin="use-credentials">
and file is in/folder/
in deployed state, in root in local test.<script type="text/javascript" src="sw.js"></script>
and file is in/folder/
in deployed state, in root in local test.- start_url in manifest is
/folder/
. - icon path in manifest is
assets/icons/icon.png
,assets
is in/folder/
in deployed state, in root in local test.
locally the icons work but on the deployed site I get:
Icon https://sub.domain.com/folder/assets/icons/icon.png failed to load
When I go to that URL directly, the file loads just fine.
The site is behind auth but I use crossorigin="use-credentials"
when loading the manifest.
Full manifest.json:
{
"short_name": "Site Hub",
"name": "Site Hub",
"start_url": "/docs/?utm_source=web_app_manifest",
"icons": [
{
"src": "assets/icons/manifest-icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "assets/icons/manifest-icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"display": "standalone",
"orientation": "portrait",
"theme_color": "#20232A",
"background_color": "#20232A"
}
I have tried paths like ./assets/icons/manifest-icon-512.png"
before and it did not work either.