Dear,
I know, that this doesn't fully belong here, but I hope that you can help me.
I'm training to use nginx reverse proxy to redirect websockets to tornado server...
Tornado websocket handler works properly... But trough nginx, it changes ws:// to http:// with GET request
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 5252;
location /ws {
proxy_pass http://127.0.0.1:10001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}
. . .
}
From tornado I recieve:
WARNING:tornado.access:403 GET /ws/ (127.0.0.1) 0.38ms
With HTTP/GET method it works well.
Thank you so much for all answers,
and have a nice day!
Roman