AWS AmazonCloudFront: WebSocket connections: HTTP version support for viewer and origin
Summary
Replaces the note that CloudFront only supports WebSockets over HTTP/1.1 with a new section explaining that viewers connect over HTTP/1.1 (no HTTP/2 or HTTP/3), while CloudFront-to-origin connections can use HTTP/2 when the origin HTTP version is HTTP/2 and the origin supports WebSockets over HTTP/2 via the extended CONNECT method (RFC 8441, SETTINGS_ENABLE_CONNECT_PROTOCOL).
Security assessment
The change is purely a protocol-capability clarification (HTTP/1.1 vs HTTP/2/HTTP/3 and RFC 8441 extended CONNECT) for WebSocket traffic; it documents supported transport versions and does not describe a vulnerability, credential handling, or access control change.
Evidence
+Viewers connect to CloudFront for WebSockets over HTTP/1.1. CloudFront doesn't support WebSocket connections from viewers over HTTP/2 or HTTP/3.
Diff
diff --git a/AmazonCloudFront/latest/DeveloperGuide/distribution-working-with.websockets.md b/AmazonCloudFront/latest/DeveloperGuide/distribution-working-with.websockets.md index f9d19bb..a53c195 100644 --- a//AmazonCloudFront/latest/DeveloperGuide/distribution-working-with.websockets.md +++ b//AmazonCloudFront/latest/DeveloperGuide/distribution-working-with.websockets.md @@ -7 +7 @@ -How the WebSocket protocol worksWebSocket requirementsRecommended WebSocket headers +How the WebSocket protocol worksWebSocket requirementsRecommended WebSocket headersHTTP versions for WebSocket connections @@ -75 +75 @@ To avoid unexpected compression-related issues when using WebSockets, we recomme -Note +## HTTP versions for WebSocket connections @@ -77 +77,12 @@ Note -Currently, CloudFront only supports WebSocket connections over the HTTP/1.1 protocol. +Viewers connect to CloudFront for WebSockets over HTTP/1.1. CloudFront doesn't support WebSocket connections from viewers over HTTP/2 or HTTP/3. + +For the connection from CloudFront to your origin, CloudFront uses HTTP/1.1 by default. CloudFront can use HTTP/2 for WebSocket connections to your origin when both of the following are true: + + * The [origin HTTP version](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DownloadDistValuesOrigin.html#DownloadDistValuesOriginHttpVersion) is HTTP/2, and the origin supports HTTP/2. + + * The origin supports WebSockets over HTTP/2 with the extended `CONNECT` method (see [RFC 8441 on the IETF Datatracker website](https://datatracker.ietf.org/doc/html/rfc8441)). The origin advertises this with the `SETTINGS_ENABLE_CONNECT_PROTOCOL` setting. + + + + +Even when both are true, CloudFront might use HTTP/1.1 for some WebSocket connections to the origin, for example to limit resource usage. If the origin doesn't support WebSockets over HTTP/2, CloudFront uses HTTP/1.1.