Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Forward headers for API routes? #608

Closed
@mrkstwrt

Description

@mrkstwrt

Is your feature request related to a problem? Please describe.
It doesn't seem possible to add to the whitelist for headers for anything other than defaults which is then overridden by the /api/* rules.

For example with this config:

inputs:
    cloudfront:
      /api/*:
        forward:
          headers: [ authorization ]

I get the error Setting custom cache behaviour for api/ route "/api/*" is not supported

Describe the solution you'd like
I want to be able to allow the authorization header to be passed up to my API routes, I can enable this by manually going into CloudFront and adding it to the whitelist, but this is overwritten every time I deploy so it's not really a workable solution when automating deployments. Or maybe I'm just doing it wrong.

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