-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
In case I'd like to add some custom headers like X-Frame-Options or Content-Security-Policy, it seems my only option is to add a CloudFront function or a Lambda@Edge function, as per the following resources:
- https://stackoverflow.com/questions/33144580/configuring-x-frame-options-response-header-on-aws-cloudfront-and-s3
- https://stackoverflow.com/questions/69227820/add-x-frame-options-header-to-all-urls-using-cloudfront-functions
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/example-function-add-security-headers.html
- https://github.com/aws-samples/amazon-cloudfront-functions/tree/main/add-security-headers
I'd like to be able to set something like:
component: website
name: my-website
inputs:
src: ./src
domain: serverless.com
bucketName: my-bucket
headers:
X-Frame-Options: DENYI can try to help with a PR for this, but I'd appreciate some pointers on whether this is something you'd be interested in supporting, since there's only one other similar request and I couldn't find anything for custom headers in the code (only this hints at it, but it isn't the same thing)
Metadata
Metadata
Assignees
Labels
No labels