Blocked by CORS Policy.(sovled)

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."

facing same issue. dev please help

Did you use a cors() middleware ?

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

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