Skip to content

The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:XXXX, *', but only one is allowed. #1304

Answered by miguelgrinberg
wlneo asked this question in Q&A
Discussion options

You must be logged in to vote

I probably wasn't very clear. With your initial code, I suggested you remove CORS from Socket.IO, because you had Socket.IO as a route mounted on the FastAPI app. If that didn't work, then use the method I recommend you have to enable CORS on both sides, because the FastAPI and the Socket.IO sides run independently.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@miguelgrinberg
Comment options

Answer selected by wlneo
@wlneo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants