Skip to content
v2.275.0

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 ​

MemberDescription
HTTP1_1HTTP 1.1 only.
HTTP2HTTP 2 only.
HTTP2_AND_3HTTP 2 and HTTP 3.
HTTP3HTTP 3 only (does not include HTTP 2).

Referenced by ​