简体   繁体   中英

XMLHttpRequest to Amazon S3 fails only on some computers

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM