[C]Cors Issue , connect to remote server from webgl

3 Oct 2021, 11:07

Hello with my team, we have decided to switch from version 0.10 of colyseus to version 0.14.18. We manage to connect with the remote server from Unity without worries but as soon as it comes to connecting to the remote server via the website with the WEBGL application, this one displays a CORS error that I cannot get to solve , the error seems to come from the header sent by the client :

alt text

I have an other error after that
alt text

Here is the code that allows me to make the connection:
alt text

The headers in Colyseus Settings are the same in the code previously mentioned.
The secure protocole is checked.

Hope to have some help coming here , good day for you !

3 Oct 2021, 11:53

Try to remove "Access-Control" line.

3 Oct 2021, 13:50

Hi , already tested , doesn't fix

3 Oct 2021, 15:05

@rs try to replace * with your domain.

3 Oct 2021, 15:12

Same message :/

3 Oct 2021, 15:34

ok then it's late here, I will help to test it tomorrow. see you tomorrow.

3 Oct 2021, 16:07

Ok thanks

4 Oct 2021, 13:40

I tried with and without header ( the settings are in the main post of the thread ), put logs before the connection request (directly in the colyseus code) to display the headers, they are empty or show only my settings set but nothing about "*, *", and my local wamp server has no CORS rules ... and fresh install

4 Oct 2021, 16:03

"*, *" means that there are 2 same headers in the request. there must be some settings or codes put them in the header I think.

4 Oct 2021, 17:33

I already checked the headers sent by colyseus , but there is no duplicated header.
And my local server ( from fresh install ) have no rule about allow cross origin but sent "," like the remote server

5 Oct 2021, 04:07

Please have a look at this problem @endel .

8 Oct 2021, 10:03

I found this:

1 out of 12