diff --git a/dev2/c0mpute-gateway/nginx-gateway.c0mpute.com.conf b/dev2/c0mpute-gateway/nginx-gateway.c0mpute.com.conf index 10a27d1..1315144 100644 --- a/dev2/c0mpute-gateway/nginx-gateway.c0mpute.com.conf +++ b/dev2/c0mpute-gateway/nginx-gateway.c0mpute.com.conf @@ -58,6 +58,24 @@ server { proxy_buffering off; proxy_request_buffering off; } + # WebSocket bridges to rented desktops (/desktop/v1/ws, noVNC) and remote + # browsers (/browse/v1/ws, CDP): the worker answers 101 only when the + # Upgrade header reaches it, and nginx drops hop-by-hop headers unless + # they are set here. Sessions are long-lived, so no 300 s idle cut. + location ~ ^/(desktop|browse)/v1/ws$ { + access_log off; + proxy_pass http://127.0.0.1:7777; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + 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 X-Forwarded-Proto https; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + proxy_buffering off; + } location / { # The c0mpute gateway writes its own access log (real client IPs) that # ThreatCrush tails; logging here too counted every request twice.