proxy_set_header Connection “Upgrade”; proxy_read_timeout 86400; proxy_http_version 1.1; proxy_set_header X-Real-IP \(remote_addr; proxy_set_header X-Forwarded-For \)proxy_add_x_forwarded_for; }
This configuration is for setting up a WebSocket proxy server. It sets the location to “/webSocket” and forwards all requests to the “host”. The headers are set to allow upgrading the connection to WebSocket protocol. Other headers like Real IP and Forwarded For are also set for logging purposes. The timeout is set to 86400 seconds (24 hours).