-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORS problems when anywhere other than localhost #7
Comments
That's most likely a header issue in the XHR request, I can fix that at some point. Doing the API calls from the browser compared to the server would make no difference I'm pretty sure, it'd just slow the application down if I ever host it on a domain. |
the Origin header is a protected header, in-browser JavaScript wont let you change it. Slowing it down slightly is an acceptable tradeoff for having more control over the requests that are sent to the api. |
Could you paste the request (including headers) + the response error from devtools here please? |
Request headers:
Response headers:
|
Oh so the browser's giving you the error - not the iView site? |
Yeah because the browser is making the request and the iview api has strict Cors |
I fixed this in my branch here: https://github.com/gdunstone/iview-proxy/tree/proxy-requests Ill create a pull request once my other pr is accepted. |
When hosting this on anything other than localhost, I get CORS errors when viewing a show.
I get CORS Missing Allow Origin.
I dont think that doing the API requests from the browser is the best idea. The server app should also act as a proxy for the browsers API calls.
The text was updated successfully, but these errors were encountered: