⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@salonichf5
Copy link
Contributor

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

  1. Potentially sensitive information includes personally identify information (PII), authentication credentials, and live URLs. Refer to the style guide for guidance about placeholder content.

@salonichf5 salonichf5 requested a review from a team as a code owner January 16, 2026 02:28
@github-actions github-actions bot added documentation Improvements or additions to documentation product/ngf Issues related to NGINX Gateway Fabric labels Jan 16, 2026
@salonichf5 salonichf5 requested review from a team and Copilot January 16, 2026 02:28
Copy link

Copilot AI left a 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:
Copy link

Copilot AI Jan 16, 2026

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.

Copilot uses AI. Check for mistakes.
- `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`.
Copy link

Copilot AI Jan 16, 2026

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.

Copilot uses AI. Check for mistakes.
< 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.
Copy link

Copilot AI Jan 16, 2026

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.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Deploy Preview will be available once build job completes!

Name Link
😎 Deploy Preview https://frontdoor-test-docs.nginx.com/previews/docs/1658/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation product/ngf Issues related to NGINX Gateway Fabric

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants