HttpVersion Enum
The HTTP version(s) to enable on the distribution.
Note: Setting HTTP3 enables HTTP 3 only (not HTTP 2). To support both HTTP 2 and HTTP 3, use HTTP2_AND_3.
Example
ts
// Configure a distribution to use HTTP/2 and HTTP/3
new cloudfront.Distribution(this, 'myDist', {
defaultBehavior: { origin: new origins.HttpOrigin('www.example.com') },
httpVersion: cloudfront.HttpVersion.HTTP2_AND_3,
});
Members
| Member | Description |
|---|---|
HTTP1_1 | HTTP 1.1 only. |
HTTP2 | HTTP 2 only. |
HTTP2_AND_3 | HTTP 2 and HTTP 3. |
HTTP3 | HTTP 3 only (does not include HTTP 2). |
Referenced by
CloudFrontWebDistributionProps.httpVersionhttp_versionhttpVersionHttpVersionHttpVersionDistributionProps.httpVersionhttp_versionhttpVersionHttpVersionHttpVersion