Announcements

Help Wizard

Step 1

NEXT STEP

Spotify API Returns Results Fine in Backend but return CORS error in API gateway deployment.

Spotify API Returns Results Fine in Backend but return CORS error in API gateway deployment.

I've been running into an issue for the past couple weeks where my Flask backend returns information about my Spotify playlists and genres just fine, but when deploying it via a public tunnel (ngrok), I'm running into the following issue:

 

Access to fetch at {ngrok_url} from origin {localhost} 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'.

 

I've made sure to whitelist which domains it should be able to fetch from, so I'm not sure what's causing this. Any help is great!

Reply
0 Replies

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random