Proxy WebSockets in testdev
@@ -122,15 +122,23 @@ http {
sendfile on;
tcp_nopush on;
+ map \$http_upgrade \$connection_upgrade {
+ default upgrade;
+ '' close;
+ }
+
server {
listen ${PORT};
root web2/htdocs;
+
location / {
proxy_pass http://127.0.0.1:8180;
proxy_redirect off;
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
+ proxy_set_header Upgrade \$http_upgrade;
+ proxy_set_header Connection \$connection_upgrade;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
