enum OriginProtocolPolicy
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.CloudFront.OriginProtocolPolicy |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#OriginProtocolPolicy |
Java | software.amazon.awscdk.services.cloudfront.OriginProtocolPolicy |
Python | aws_cdk.aws_cloudfront.OriginProtocolPolicy |
TypeScript (source) | aws-cdk-lib » aws_cloudfront » OriginProtocolPolicy |
Defines what protocols CloudFront will use to connect to an origin.
Example
declare const loadBalancer: elbv2.ApplicationLoadBalancer;
const origin = new origins.LoadBalancerV2Origin(loadBalancer, {
connectionAttempts: 3,
connectionTimeout: Duration.seconds(5),
readTimeout: Duration.seconds(45),
responseCompletionTimeout: Duration.seconds(120),
keepaliveTimeout: Duration.seconds(45),
protocolPolicy: cloudfront.OriginProtocolPolicy.MATCH_VIEWER,
});
Members
| Name | Description |
|---|---|
| HTTP_ONLY | Connect on HTTP only. |
| MATCH_VIEWER | Connect with the same protocol as the viewer. |
| HTTPS_ONLY | Connect on HTTPS only. |
HTTP_ONLY
Connect on HTTP only.
MATCH_VIEWER
Connect with the same protocol as the viewer.
HTTPS_ONLY
Connect on HTTPS only.

.NET
Go
Java
Python
TypeScript (