nginx-gateway-fabric
nginx-gateway-fabric copied to clipboard
Document websocket support
trafficstars
As an NGF user I want to know how to use NGF works with websocket applications So that I can run my websocket application fronted by NGF.
Acceptance
- Write a brief document or paragraph on how to use websocket services with NGF
- This really just involves the client setting the
Upgrade: websocketheader in a request. - Any additional websocket-specific headers can be specified in a header filter if necessary (like
Sec-WebSocket-KeyorSec-WebSocket-Version
- This really just involves the client setting the
An example default route this is of type Exact
location = /query {
proxy_http_version 1.1;
proxy_set_header Host "$gw_api_compliant_host";
proxy_set_header X-Forwarded-For "$proxy_add_x_forwarded_for";
proxy_set_header Upgrade "$http_upgrade";
proxy_set_header Connection "$connection_upgrade";
proxy_set_header X-Real-IP "$remote_addr";
proxy_set_header X-Forwarded-Proto "$scheme";
proxy_set_header X-Forwarded-Host "$host";
proxy_set_header X-Forwarded-Port "$server_port";
proxy_pass http://blogs_blogs-be_80$request_uri;
}
So websocket support is there by default
Yes, websockets are supported. We just want to make sure we document it so users are aware.
This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.