Skip to content

Adding custom security headers #88

@BrunoBernardino

Description

@BrunoBernardino

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions