You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered an issue today where:
1- My first request to my css file on cloudfront (from head) would get cached.
2- The second (CORS) request to my css from this library would still get the
same cached response even though there's a valid origin header in the request.
3- That would result in Safari denying the CORS because Cloudfront won't
return the proper headers.
I hacked it by adding changing the url in the getCors function to:
url = url + "?rng=" Math.random()
It works like a charm in my case because I needed to make sure that the CORS request wouldn't receive a cached response.
This should definitely be a configurable thing. importCrossOriginLinks() is the embedded utility that loads cross origin content automatically. I guess we could make initialize() accept an optional argument initOptions.loadCrossOriginContent which would be a function that has the same signature as getCors() and take over the loading entirely. This is the most flexible extension, as you're no longer limited to loading data via HTTP/S.
I've encountered an issue today where:
1- My first request to my css file on cloudfront (from head) would get cached.
2- The second (CORS) request to my css from this library would still get the
same cached response even though there's a valid origin header in the request.
3- That would result in Safari denying the CORS because Cloudfront won't
return the proper headers.
I hacked it by adding changing the url in the getCors function to:
It works like a charm in my case because I needed to make sure that the CORS request wouldn't receive a cached response.
Here's the issue I'm talking about:
https://forums.aws.amazon.com/thread.jspa?messageID=555417򇦙
http://stackoverflow.com/questions/12498704/cached-non-cors-response-conflicts-with-new-cors-request
I would like to transform this issue into a PR, but I think it's best that I get your opinion on how you would want to implement the fix first.
Thanks.
The text was updated successfully, but these errors were encountered: