Skip to content
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

services.odata.org/TripPinRESTierService ::: The server is incorrectly responding with two Access-Control-Allow-Origin #262

Open
shlomo7492 opened this issue Apr 7, 2021 · 3 comments
Assignees

Comments

@shlomo7492
Copy link

It works with Postman and in browsers, but when using it in my js code to fetch data with fetch api or axios it throws error:

Access to fetch at 'https://services.odata.org/TripPinRESTierService/(S(negfbklwt4uhmeegv0o43zyh))/People' from origin 'http://127.0.0.1:5500' has been blocked by CORS policy: Response to preflight request doesn't pass access control check

The 'Access-Control-Allow-Origin' header contains multiple values '*, ', but only one is allowed. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

@mikepizzo
Copy link
Member

Weird -- I thought we fixed this.

@mikepizzo
Copy link
Member

It looks like this was fixed and pushed to staging, but not pushed to production awaiting additional preflight work.

@shlomo7492 -- Can you confirm that https://services.odata.org/Trippin_Staging/People behaves correctly? That will help us determine whether the fix is good to push to production.

@happpystory
Copy link

@mikepizzo I can confirm that it behaves correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants