breautek commented on issue #43: Network Error cordova [email protected][bug] URL: https://github.com/apache/cordova-plugin-whitelist/issues/43#issuecomment-539524095 > XMLHttpRequest cannot load https://staging-server.****.com/version. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. This is a CORS error. It happens on devices that uses a CORS enabled webview, which is most modern devices. It's a backend configuration. Your server should respond to `OPTIONS` method on every API and it should return exactly 0 bytes in content in the `OPTIONS` request. It should also supply the CORS headers. CORS is a big topic that is unrealistically for me to explain how to use here, but you can read more about it on [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
