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.

Allow overriding of lambda@edge origin-request for custom paths #892

Open
@rdsedmundo

Description

@rdsedmundo

Is your feature request related to a problem? Please describe.
I have a custom path on my NextJS app that I want to route through a custom Lambda@Edge function of my own, but this code overrides it even if I provide it in the input configuration.

Describe the solution you'd like
Allow the override to happen, I don't think it makes sense to have a configuration that gets overridden always.

Describe alternatives you've considered
Since I can't do this override I have to manually edit the default-lambda code using a custom script on the build.postBuildCommands.

Additional context

nextApp:
  component: '@sls-next/[email protected]'
  inputs:
    cloudfront:
      /custom-route/*:
        viewerProtocolPolicy: 'redirect-to-https'
        allowedHttpMethods:
          ['GET', 'HEAD', 'OPTIONS', 'PUT', 'POST', 'PATCH', 'DELETE']
        minTTL: 0
        maxTTL: 31536000
        defaultTTL: 0
        forward:
          cookies: 'all'
          queryString: true
        compress: true
        lambda@edge:
          origin-request: THIS_GETS_OVERRIDEN_WITH_THE_DEFAULT_LAMBDA_ARN

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions