-
Notifications
You must be signed in to change notification settings - Fork 162
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
Is it possible to load the progressive web app manifest file from authenticated site? #535
Comments
This also sounds like a bug in Chrome: loading manifest should send the same information along as any other |
@svdoever Building on @marcoscaceres's suggestion, would you please try testing in Edge, Internet Explorer, and/or Firefox and let folks know if the issue can be reproduced in multiple web browsers. |
I believe that you must specify crossOrigin="use-credentials" in the manifest link tag to allow the manifest fetch to use cookies and credentials in Chrome. |
@dominickng you are a hero! crossOrigin="use-credentials" did the job! |
Closing as fixed. :) |
Thanks @dominickng! My bad for assuming it was a bug in Chrome. |
I still think that all hrefs to same domain should get the authentication headers passed through... other assets can be loaded without the crossOrigin property. |
I need to check what HTML says. Ideally, I'd like to just follow whatever it says to do wrt loading resources from link relationships. |
This behavior is still surprising to me and others. |
My reading of the spec is that by default, a From my reading of the HTML spec, I compiled this table. In summary:
In all cases, you should get credentials if the request goes to the same origin. I'm not quite sure what a "non-CORS" request is in this default case. It looks fairly restricted. So this could indeed be a Chrome bug if we aren't passing the credentials along. |
Since this isn't a spec issue, transferring this to https://crbug.com/901705. |
OK we had a closer look (with @dominickng). This is a spec issue, because the Manifest spec explicitly overrides HTML's "Obtaining a resource from a link element" algorithm. https://www.w3.org/TR/appmanifest/#obtaining So while normal For historical discussions, see:
Looks like this has all been litigated in 2014 and a conclusion was made to override the default behaviour of HTML. Keeping this closed as I don't think it's worth going over this again. |
Thanks for doing the archeology on it! |
Thanks for the archeology, needed this today. Cheers. |
If the new behavior for |
I'm having the progressive web app index.html page and assets in a SharePoint document library. I need to authenticate when accessing the index.html page. But the manifest.json file as linked as does not have the required authentication cookie when requested from the index.html page. Note that SharePoint does not serve .jon files, that is why it ends with .txt. Is there a way to retrieve the manifest from an authenticated site?
It works when I have the manifest on an anonymously accessible location, i.e. outside of SharePoint (I now use my dropbox). In that case I need to specify a full path for the start_url. But this is not a really nice deployment model because I need to deploy files to two different locations...
The text was updated successfully, but these errors were encountered: