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

Adding custom security headers #88

Open
BrunoBernardino opened this issue Nov 26, 2021 · 4 comments
Open

Adding custom security headers #88

BrunoBernardino opened this issue Nov 26, 2021 · 4 comments

Comments

@BrunoBernardino
Copy link

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:

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: DENY

I 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)

@BrunoBernardino
Copy link
Author

@eahefnawy / @ac360 I've noticed there hasn't been much activity here for almost a year. Let me know if there's a better component/thing to use instead! Thanks.

@weekwood
Copy link

AWS introduces response headers policies, when I modified it from cloudfront console and deploy again, ResponseHeadersPolicyId field got removed.

@mnapoli
Copy link

mnapoli commented Feb 7, 2022

Hi, thanks for sharing the use case. That is an interesting feature request. To clarify a bit, note that there are no plans to implement (or review/test/merge a PR) that feature in the coming months.

@BrunoBernardino
Copy link
Author

Thanks.

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

3 participants