-
Notifications
You must be signed in to change notification settings - Fork 134
NGF: Add documentation about web sockets #1658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ngf-release-2.4
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds documentation for WebSocket connection upgrade functionality in NGINX Gateway Fabric (NGF). The documentation explains how to upgrade HTTP/1.1 requests to WebSocket connections using the appropriate headers.
Changes:
- Updated the nginx-hugo-theme dependency from v2.0.0 to v2.0.3
- Added a new "WebSocket Connection Upgrade" section with example curl command and expected response
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| go.mod | Updated nginx-hugo-theme dependency version to support new documentation features |
| content/ngf/traffic-management/basic-routing.md | Added WebSocket connection upgrade documentation with headers explanation and curl example |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ## WebSocket Connection Upgrade | ||
|
|
||
| NGINX Gateway Fabric can upgrade HTTP/1.1 requests to websocket connections when the appropriate headers are present and the backend supports websocket connections. The backend is responsible for completing the handshake by responding with `101 Switching Protocols`. To ensure this example works, your backend must support websocket connections. Send a `curl` request that includes the required websocket upgrade headers, described below: |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term 'websocket' should be capitalized as 'WebSocket' throughout the documentation for consistency with industry-standard terminology and RFC 6455.
| - `Connection: Upgrade` — requests a protocol change on the current connection. | ||
| - `Upgrade: websocket` — indicates the desired protocol. | ||
| - `Sec-WebSocket-Version: 13` — required websocket protocol version. | ||
| - `Sec-WebSocket-Key` — a random, base64-encoded nonce used by the server to compute `Sec-WebSocket-Accept`. |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term 'websocket' should be capitalized as 'WebSocket' throughout the documentation for consistency with industry-standard terminology and RFC 6455.
| < Sec-WebSocket-Accept: On5gtTNGCqB4Emnh7Ck4T0b2gks= | ||
| ``` | ||
|
|
||
| Receiving a `101 Switching Protocols` response along with the `Upgrade`, `Connection`, and `Sec-WebSocket-Accept` headers confirms that the websocket connection upgrade completed successfully. |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term 'websocket' should be capitalized as 'WebSocket' throughout the documentation for consistency with industry-standard terminology and RFC 6455.
✅ Deploy Preview will be available once build job completes!
|
Proposed changes
Adds a small section explaining how to use websocket with NGF
Checklist
Before sharing this pull request, I completed the following checklist:
Footnotes
Potentially sensitive information includes personally identify information (PII), authentication credentials, and live URLs. Refer to the style guide for guidance about placeholder content. ↩