XMLHttpRequest to Amazon S3 fails only on some computers

僤鯓⒐⒋嵵緔 提交于 2019-12-12 01:53:23

问题


Our web app is an uploader the pushes directly to Amazon S3. It has never failed testing, however, now that a client has the software they are experiencing a 50/50 success rate per computer.

Seems that the error appears on any browser on the bad computers: XMLHttpRequest cannot load "www.DOMAIN.json". Origin ... is not allowed by Access-Control-Allow-Origin.

  • host file does not have unique settings
  • network that the computer is connected to does affect outcome
  • two similar computers (os, browser, network) and one works, the other doesn't.

This is the jQuery uploader, modified. We use CORS method. https://duckduckgo.com/Cross-origin_resource_sharing?ia=about

Any experienced cross-domain warriors out there?


回答1:


Good news! We sorted this out by adding https:// to the app URL. This doesn't 100% solve our current problem, but it allows us to program a more graceful fallback.



来源:https://stackoverflow.com/questions/27386108/xmlhttprequest-to-amazon-s3-fails-only-on-some-computers

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