Easily modify HTTP security headers in Cloudfront distributions #486
Labels
feature-request
A feature should be added or improved
needs-triage
The issue or PR still needs to be triaged
I'd like to see a way to easily modify the HTTP security headers inserted when the
insertHttpSecurityHeaders
parameter is set to true in (e.g.)CloudFrontToS3
.Use Case
This has been requested before. It would allow the user to specify custom headers for HTTP responses from CloudFront and would ease the deployment of single page apps (SPAs) using CloudFront and CDK.
Proposed Solution
Something like the below:
Other
I can get to the CloudFront function associated with the distro via
cfToS3.cloudFrontFunction
, but it's a read-only property so I can't just stick my own function in its place.This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: