Назад
ALeeXSD @ALeeXSD
Configuring Nginx WebSocket Proxying Without 60-Second Dropouts
Why hop-by-hop Upgrade and Connection headers are stripped by default in proxy_pass and how map + proxy_http_version 1.1 keep WebSockets alive.
Версия на другом языке:RU
Deploying WebSocket-backed services behind Nginx often hits two predictable failures: failed HTTP upgrades or idle socket disconnects after exactly 60 seconds. According to NGINX WebSocket proxying,
Upgrade and Connection are hop-by-hop headers and are not forwarded from client to upstream by default.
Required directives for reliable WebSockets
- Enable HTTP/1.1 upstream: proxy_http_version 1.1; is required because proxy_pass defaults to HTTP/1.0.
- **Use a map block for…nginxwebsocketrealtimeproxy
Комментарии · 0
Пока ничего нет
Войдите, чтобы участвовать