New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web App Manifest blocked by CORS when hosted behind authentication #1802
Comments
Hey man, this helped me solve the same issue for an S3/CloudFront website - thanks for making it google-able! |
How Can i solve this problem? adding crossorigin is not solving this. |
this worked for me too. |
it doesn't work |
Adding crossorigin may be the initial solution we come to, however there may be more circumstances where this cannot work. We will need more information - can you please create a reproduction repo and link here? If you can also speak to any nginx/Apache/Aws rules you set, that would help as well. |
Adding <link rel="manifest" href="%PUBLIC_URL%/manifest.json" crossorigin="use-credentials"> did not solve the problem, are there any other suggestions for this ? |
I had same issue and was tearing my hair out. |
replace this with |
this worked for me too. |
hey, the issue is happen not only because of the crossorigin, may be you run the web app through the path. |
My app is hosted on Azure, and the container only allows authenticated traffic. So, the PWA runs except the images do not render until the page is hard refreshed. So, in this scenario, it routes the user to the login page (Microsoft) and then, once back to the PWA landing page, puff we have the images rendered. It is not a desired behaviour for sure. |
Stencil version:
@stencil/core@1.2.3
I'm submitting a:
[x] bug report
[ ] feature request
[ ] support request
Current behavior:
Currently, when deploying a Stencil site / app to a host behind authentication, the manifest file fails to load with the following error:
Expected behavior:
The manifest should be loaded with
crossorigin="use-credentials"
so that the browser sends the auth credentials when requesting the manifest. See MDN for details.Steps to reproduce:
Other information:
I'm not sure where the template for the generated
index.html
file lives, but I believe this fix should be as simple as changing:to
The text was updated successfully, but these errors were encountered: