nginx-kit/proxy_pass/websocket.conf
2026-06-09 14:41:15 +08:00

8 lines
415 B
Text

# nginx defaults to proxying with HTTP/1.0. Websocket upgrade requires 1.1, so
# keep that here instead of in the generic forwarded.conf snippet.
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
# Use the mapped value from http/websocket-map.conf so non-upgrade requests can
# still close cleanly instead of always advertising "Connection: upgrade".
proxy_set_header Connection $connection_upgrade;