spotify / web-api-examples

Basic examples to authenticate and fetch data using the Spotify Web API
Apache License 2.0
1.98k stars 1.66k forks source link

CORS not working here #37

Closed sittelle closed 3 years ago

sittelle commented 5 years ago

Server gets user information. Client request gets rejected: "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.spotify.com/v1/me. (Reason: CORS request did not succeed)."

I don't know how to fix this.

BR

Casey6624 commented 4 years ago

Try enabling this during development

https://chrome.google.com/webstore/detail/allow-cors-access-control/lhobafahddgcelffkeicbaginigeejlf?hl=en

Colnup commented 3 years ago

I've got the same issue. I tried to install https://addons.mozilla.org/en-US/firefox/addon/access-control-allow-origin/ and enabled it, it worked on the test webpage (https://webbrowsertools.com/test-cors/), but still don't work on localhost:8888/ , and I get the same "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.spotify.com/v1/me. (Reason: CORS request did not succeed)." than Gregor.

I don't know how to fix, please help.