24 lines
900 B
Text
24 lines
900 B
Text
|
|
# osint.rpi.local — WebSocket upgrade for /ws/live
|
||
|
|
#
|
||
|
|
# GitOps: this file is the source of truth. On the Pi:
|
||
|
|
# sudo cp deploy/osint-ws.nginx.conf /etc/nginx/snippets/osint-ws.conf
|
||
|
|
# then `include snippets/osint-ws.conf;` inside the osint.rpi.local server
|
||
|
|
# block (before `location /`), `nginx -t && systemctl reload nginx`.
|
||
|
|
#
|
||
|
|
# Without these headers nginx proxies GET /ws/live as HTTP/1.0 → FastAPI 404
|
||
|
|
# and the HUD reconnects every few seconds.
|
||
|
|
|
||
|
|
location /ws/ {
|
||
|
|
proxy_pass http://127.0.0.1:8000;
|
||
|
|
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 $scheme;
|
||
|
|
proxy_read_timeout 3600s;
|
||
|
|
proxy_send_timeout 3600s;
|
||
|
|
proxy_buffering off;
|
||
|
|
}
|