/api/socket returns 405 Method Not Allowed

Zangetsua year ago

@Thiago Azevedo Yes! I added connection_upgrade variable to my nginx.conf (example below:)

map $http_upgrade $connection_upgrade {
        default upgrade;
        '' close;
    }

And ignored the fact that the http request returns 405. The sockets still connect regardless.

You can view the source code of Traccar here you can see that they just create a socket instance and connect regardless of the http request return result.

Hope this helps!

Thiago Azevedoa year ago

Thank you, it was a great help!

Track-tracea year ago

@Zangetsu,

So what does this Nginx.conf code actually do ?

 map $http_upgrade $connection_upgrade {
        default upgrade;
        '' close;
    }

P.s.
Can you also show me your nginx config please.