I’m running into an issue where it seems that calls to the Ionic platform (specifically Ionic User) are returning HTTP 400 errors. I don’t recall this happening before, and calls fail in both the iOS simulator/device and in-browser, so I don’t think it’s Chrome’s CORS bug. I also haven’t touched any of the code that I use to call Ionic User, so I’m not really sure what’s going on. That end of things is pretty vanilla.
Here’s the error that Safari’s inspector returns:
[Error] Failed to load resource: the server responded with a status of 400 (BAD REQUEST) (identify, line 0), https://apps.ionic.io/api/v1/app/APP_ID/users/identify
Ionic User: – Error: Request Failed with status code of 400, ionic.io.bundle.min.js:2:6166
Ionic User: Error: CORS request rejected: https://apps.ionic.io/api/v1/app/APP_ID/users/identify(…)
XMLHttpRequest cannot load https://apps.ionic.io/api/v1/app/APP_ID/users/identify. Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values 'http://evil.com/, *', but only one is allowed. Origin 'http://localhost:8100' is therefore not allowed access.
This occurs upon any call to Ionic User, and depending on the situation it can cause the app to not load at all on-device. It also happens on all devices, in iOS simulator, and in the browser, and only whenever I call Ionic User’s
Any help would be appreciated. Thanks!!