-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CloudFront] Distribution - Advanced cache behavior control #9107
Comments
I think this is a bug (at least a documentation bug).
const myWebDistribution = new cloudfront.Distribution(this, 'myDist', {
defaultBehavior: {
origin: cloudfront.Origin.fromBucket(myBucket),
allowedMethods: AllowedMethods.ALLOW_ALL,
viewerProtocolPolicy: ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
}
}); But it's not in type declarations export interface AddBehaviorOptions {
/**
* HTTP methods to allow for this behavior.
*
* @default - GET and HEAD
*/
readonly allowedMethods?: AllowedMethods;
/**
* Whether CloudFront will forward query strings to the origin.
* If this is set to true, CloudFront will forward all query parameters to the origin, and cache
* based on all parameters. See `forwardQueryStringCacheKeys` for a way to limit the query parameters
* CloudFront caches on.
*
* @default false
*/
readonly forwardQueryString?: boolean;
/**
* A set of query string parameter names to use for caching if `forwardQueryString` is set to true.
*
* @default []
*/
readonly forwardQueryStringCacheKeys?: string[];
}
/**
* Options for creating a new behavior.
*
* @experimental
*/
export interface BehaviorOptions extends AddBehaviorOptions {
/**
* The origin that you want CloudFront to route requests to when they match this behavior.
*/
readonly origin: Origin;
} |
…er protocol, and smooth streaming Adds support for many of the missing properties for controlling behaviors on the new Distribution construct. Also removed (currently unavailable) properties from the README. The remaining properties will come in a follow-up PR. They were not included in this PR due to either being blocked by the latest CloudFormation spec merge, or are still being prioritized (e.g., fieldLevelEncryption). related #7086 related #9107
This work is going to be split into 2 (or 3) different PRs:
The remaining two properties ( |
…er protocol, and smooth streaming (#9411) Adds support for many of the missing properties for controlling behaviors on the new Distribution construct. Also removed (currently unavailable) properties from the README. The remaining properties will come in a follow-up PR. They were not included in this PR due to either being blocked by the latest CloudFormation spec merge, or are still being prioritized (e.g., fieldLevelEncryption). related #7086 related #9107 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…er protocol, and smooth streaming (#9411) Adds support for many of the missing properties for controlling behaviors on the new Distribution construct. Also removed (currently unavailable) properties from the README. The remaining properties will come in a follow-up PR. They were not included in this PR due to either being blocked by the latest CloudFormation spec merge, or are still being prioritized (e.g., fieldLevelEncryption). related #7086 related #9107 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…er protocol, and smooth streaming (aws#9411) Adds support for many of the missing properties for controlling behaviors on the new Distribution construct. Also removed (currently unavailable) properties from the README. The remaining properties will come in a follow-up PR. They were not included in this PR due to either being blocked by the latest CloudFormation spec merge, or are still being prioritized (e.g., fieldLevelEncryption). related aws#7086 related aws#9107 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I would be very happy if "forwarded cookies" configuration method support ! |
|
Expand the new Distribution behaviors to support custom TTLs, configuring forwarded values, and other caching properties.
For completeness, the following are the set of L1 properties that are missing from the current L2:
(This ignores Lambda, which is being tracked separately in #9108)
Proposed Solution
See aws/aws-cdk-rfcs#171.
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: