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

Cross-Origin Request Blocked #12

Open
fabricepallaud opened this issue Nov 7, 2019 · 4 comments
Open

Cross-Origin Request Blocked #12

fabricepallaud opened this issue Nov 7, 2019 · 4 comments

Comments

@fabricepallaud
Copy link

Using snippet provided, I'm getting this error:

Access to XMLHttpRequest at 'http://192.168.0.10:8080/sockjs-node/info?t=1573126923594' from origin 'http://localhost:8080' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

Any idea how to solve that issue?

@josue-rojas
Copy link
Owner

josue-rojas commented Nov 8, 2019

can you post the code?

@Akashamba
Copy link

Akashamba commented Dec 4, 2020

I'm getting the following error,

Access to fetch at 'https://od-api.oxforddictionaries.com/api/v2/entries/en-gb/ace?&strictMatch=false' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I got the same error when I used a regular fetch.
I'm trying to access the api from a React app.

Has this issue been solved?

@RafJube
Copy link

RafJube commented Oct 28, 2022

I have the same issue but I didn't find the solution. What's your recommendation?

@Akashamba
Copy link

I was trying to access the API from a react app when I encountered this error. I tried the same from a nodeJS application and things seemed to work. But this issue is still a mystery to me.

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

4 participants