CustomOriginConfig Struct
A custom origin configuration.
Example
ts
declare const sourceBucket: s3.Bucket;
declare const oai: cloudfront.OriginAccessIdentity;
new cloudfront.CloudFrontWebDistribution(this, 'MyCfWebDistribution', {
originConfigs: [
{
s3OriginSource: {
s3BucketSource: sourceBucket,
originAccessIdentity: oai,
},
behaviors: [ {isDefaultBehavior: true}],
},
{
customOriginSource: {
domainName: 'MYALIAS',
},
behaviors: [{ pathPattern: '/somewhere' }]
}
],
});
Properties
allowedOriginSSLVersionsOriginSslPolicy[]allowed_origin_ssl_versionstyping.List[OriginSslPolicy]allowedOriginSSLVersionsList<OriginSslPolicy>AllowedOriginSSLVersionsOriginSslPolicy[]AllowedOriginSSLVersions*[]OriginSslPolicy= OriginSslPolicy.TLS_V1_2#The SSL versions to use when interacting with the origin.
The domain name of the custom origin.
Should not include the path - that should be in the parent SourceConfiguration
The origin HTTP port.
The origin HTTPS port.
originHeaders{ [key: string]: string }origin_headerstyping.Mapping[str, str]originHeadersMap<String, String>OriginHeadersIDictionary<string, string>OriginHeaders*map[string]*string= No additional headers are passed…#Any additional headers to pass to the origin.
default
Default: No additional headers are passed.
originKeepaliveTimeoutDurationorigin_keepalive_timeoutDurationoriginKeepaliveTimeoutDurationOriginKeepaliveTimeoutDurationOriginKeepaliveTimeoutDuration= Duration.seconds(5)#The keep alive timeout when making calls in seconds.
The relative path to the origin root to use for sources.
originProtocolPolicyOriginProtocolPolicyorigin_protocol_policyOriginProtocolPolicyoriginProtocolPolicyOriginProtocolPolicyOriginProtocolPolicyOriginProtocolPolicyOriginProtocolPolicyOriginProtocolPolicy= OriginProtocolPolicy.HttpsOnly#The protocol (http or https) policy to use when interacting with the origin.
originReadTimeoutDurationorigin_read_timeoutDurationoriginReadTimeoutDurationOriginReadTimeoutDurationOriginReadTimeoutDuration= Duration.seconds(30)#The read timeout when calling the origin in seconds.
originShieldRegionstringorigin_shield_regionstroriginShieldRegionStringOriginShieldRegionstringOriginShieldRegion*string= origin shield not enabled#When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.