Cloudfront Firefox CORS issues

…衆ロ難τιáo~ 提交于 2019-12-11 06:40:11

问题


We host our assets on S3 using CloudFront. Unfortunately once the asset is cached on CF, the CORS origin header does not change for any subsequent requests. That is problematic, because Firefox won't load fonts if the CORS origin is not an exact match.

I'm using the "solution" suggested here adjusting the query for each host.

Unfortunately that would require that I provide a different asset set for every possible origin

  • http://example.com
  • http://www.example.com
  • https://example.com
  • https://www.example.com
  • http://sub.example.com
  • etc...

with an adjusted query just for it, since I cannot modify the CSS file in the browser.

So I'm back at square one. Anyone solved this problem yet, preferably without an extra dedicated nginx instance that just rewrites the query based on the origin?

来源:https://stackoverflow.com/questions/20585703/cloudfront-firefox-cors-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!