Skip to content
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

Add support for CloudFront Response Headers Policy #192

Open
itschrishudson opened this issue Nov 8, 2021 · 0 comments
Open

Add support for CloudFront Response Headers Policy #192

itschrishudson opened this issue Nov 8, 2021 · 0 comments

Comments

@itschrishudson
Copy link
Contributor

Describe the Feature

AWS CloudFront now supports custom response headers natively without having to set these at origin or set via Lambda.

https://aws.amazon.com/about-aws/whats-new/2021/11/amazon-cloudfront-supports-cors-security-custom-http-response-headers/

This was added to the Hashicorp AWS Provider in 3.64.0
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_response_headers_policy

Please add support for these new data objects within the S3-CDN module (feature request also created for terraform-aws-cloudfront-cdn)

Expected Behavior

When specified the module will allow passing the appropriate config maps to create request header policies in CloudFront.

Use Case

Users of AWS CloudFront may require setting of request headers for security, caching or other purposes. This has previously required these headers to be set at the origin, or an additional lambda to set these headers. AWS has now enabled this to be set as part of the CloudFront distribution configuration.

Describe Ideal Solution

Additional map(s) similar to the ordered_cache attribute that allows the appropriate config for a CORS/custom or security header policy to be provided.

Alternatives Considered

As described earlier, setting the request header at the origin, or creating an additional lambda. For some use cases both of these approaches may not be possible for various reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant