-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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): Add support for ResponseHeadersPolicy #17290
Comments
It doesn't look like CloudFormation has made any changes to CloudFront for this, and I don't see any issues for it in the coverage roadmap. @ayush987goyal you say you might be able to implement this, do you have any plans on how you might do that? |
@peterwoodworth Sorry for jumping the gun and getting too excited too fast. I, or perhaps anyone else, would only be able to implement once the CFN support for it lands of course 😅 . |
Got it 😄 just wanted to make sure I wasn't missing anything |
Hot off the press: https://twitter.com/cfnupdates/status/1456452444406358019?s=21 edit: And here is the actual link to the cfn docs. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-responseheaderspolicy.html |
Well, with the #17350 merged there is |
@ayush987goyal Sorry I was out yesterday. I’m glad you figured out how to bump the cfn specs. We’re one step closer now yay 🎉 |
@robertd Thanks! Was wondering if it is common for the spec JSON cdn (https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json) does not update even though the CFN docs are updated with all the changes? |
Another spec bump PR should now address this: #17482 |
Guys thanks for working on ResponseHeadersPolicy ! |
Thanks for working on this! :) In the meantime, is there a way to set the |
feat(cloudfront): Add support for response headers policy closes #17290 Notes: ~1. Currently the CFNSpec is not up-to-date with the latest available cloudformation changes for `ResponseHeadersPolicyId` in `AWS::CloudFront::Distribution CacheBehavior`. Some aspects of the same are added to the PR but are left commented. Would update the PR once the spec is updated.~ Refs: 1. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/adding-response-headers.html 2. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-responseheaderspolicy.html 3. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-responseheaderspolicyid ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
feat(cloudfront): Add support for response headers policy closes aws#17290 Notes: ~1. Currently the CFNSpec is not up-to-date with the latest available cloudformation changes for `ResponseHeadersPolicyId` in `AWS::CloudFront::Distribution CacheBehavior`. Some aspects of the same are added to the PR but are left commented. Would update the PR once the spec is updated.~ Refs: 1. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/adding-response-headers.html 2. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-responseheaderspolicy.html 3. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-responseheaderspolicyid ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Hi team! As i understnd it's only L1 construct? Don't want rewrite all our L2 to L1. Is it planned make available as L2 too? Or how we can combine L2 Behavior construct with this one ResponseHeaders policy? Thanks. |
@mspolitaev It is L2 construct, but it's currently only available in v2.1.0. It should be available in v1.3.5 when it gets released. |
@robertd Oh cool, it's 1.134 now latest? Hope soon will be 1.135. We will wait then. Thanks. |
Hi all, Can I please double check that this has been confirmed to be working as expected according to the docs here: https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-cloudfront.ResponseHeadersPolicy.html#static-security_headers We're seeing our ResponseHeadersPolicy being created but it isn't being applied to our Cloudfront Distribution with this setup:
Just wanted to check whether others have had success with a setup like this? |
Same here, and even if set manually it's reset when the stack is deployed again |
@ChrsWoo Can you please create new GitHub issue for better visibility.
|
Generated by running `scripts/bump-cfnspec.sh`. Wanted to speed up the additions required for aws#17290 . Feel free to close if this is supposed to be created by a bot like aws#17223 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
feat(cloudfront): Add support for response headers policy closes aws#17290 Notes: ~1. Currently the CFNSpec is not up-to-date with the latest available cloudformation changes for `ResponseHeadersPolicyId` in `AWS::CloudFront::Distribution CacheBehavior`. Some aspects of the same are added to the PR but are left commented. Would update the PR once the spec is updated.~ Refs: 1. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/adding-response-headers.html 2. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-responseheaderspolicy.html 3. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-responseheaderspolicyid ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Description
Add support for ResponseHeadersPolicy as described in the following docs:
Use Case
We need to be able to configure response CORS, headers and security policies without using cloudfront functions or Lambda@edge.
Proposed Solution
The
ResponseHeadersPolicy
should be available as a new construct under the@aws-cdk/aws-cloudfront
construct library.Other information
No response
Acknowledge
The text was updated successfully, but these errors were encountered: