Blocked by CORS Policy.(sovled)

1 Dec 2021, 02:02

When attempting to connect to my Colyseus server, I am met with the following error and I cannot figure out what to do about it.

"Access to XMLHttpRequest at 'http://server.colyseus.dev:2567/matchmake/joinOrCreate/my_room' from origin 'http://localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request."

1 Dec 2021, 09:34

facing same issue. dev please help

9 Dec 2021, 09:40

Did you use a cors() middleware ?

read more:
https://discuss.colyseus.io/topic/538/游戏服务器与-cors-跨域资源共享

9 Dec 2021, 13:39

If you're using Arena, please use wss://server.colyseus.dev instead of ws://server.colyseus.dev:2567