class CfnOriginRequestPolicyPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins.CfnOriginRequestPolicyPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awscloudfront/mixins#CfnOriginRequestPolicyPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.cloudfront.mixins.CfnOriginRequestPolicyPropsMixin |
Python | aws_cdk.mixins_preview.aws_cloudfront.mixins.CfnOriginRequestPolicyPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_cloudfront » mixins » CfnOriginRequestPolicyPropsMixin |
Implements
IMixin
Extends
Mixin
An origin request policy.
When it's attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
- The request body and the URL path (without the domain name) from the viewer request.
- The headers that CloudFront automatically includes in every origin request, including
Host,User-Agent, andX-Amz-Cf-Id. - All HTTP headers, cookies, and URL query strings that are specified in the cache policy or the origin request policy. These can include items from the viewer request and, in the case of headers, additional ones that are added by CloudFront.
CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use CachePolicy .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as cloudfront_mixins } from '@aws-cdk/mixins-preview/aws-cloudfront';
const cfnOriginRequestPolicyPropsMixin = new cloudfront_mixins.CfnOriginRequestPolicyPropsMixin({
originRequestPolicyConfig: {
comment: 'comment',
cookiesConfig: {
cookieBehavior: 'cookieBehavior',
cookies: ['cookies'],
},
headersConfig: {
headerBehavior: 'headerBehavior',
headers: ['headers'],
},
name: 'name',
queryStringsConfig: {
queryStringBehavior: 'queryStringBehavior',
queryStrings: ['queryStrings'],
},
},
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnOriginRequestPolicyPropsMixin(props: CfnOriginRequestPolicyMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Origin Request Policy Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::CloudFront::OriginRequestPolicy.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript