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

AWS API Gateway stages and nextjs uri base path #6447

Closed
danielcondemarin opened this issue Feb 25, 2019 · 1 comment
Closed

AWS API Gateway stages and nextjs uri base path #6447

danielcondemarin opened this issue Feb 25, 2019 · 1 comment

Comments

@danielcondemarin
Copy link

danielcondemarin commented Feb 25, 2019

Feature request

Is your feature request related to a problem? Please describe.

Amazon API Gateways have a stage in their URLs:

E.g. https://vbe6aad5c.execute-api.us-east-1.amazonaws.com/prod/home

This breaks next8 serverless page deployments routing because there doesn't seem to be a way to configure nextjs with a basePath (/prod in this case).

Describe the solution you'd like

I would like to be able to configure nextjs with a uri basePath which works with next's routing.

Could be something like:

next.config.js

module.exports = {
  uriBasePath: '/prod'
}

Note assetPrefix doesn't work here because it applies only to static files AFAIK.

Describe alternatives you've considered

Using a custom domain for the AWS API GW would solve the problem as it removes the /{stage} from the URL.

@timneutkens
Copy link
Member

Duplicate of #4998

@timneutkens timneutkens marked this as a duplicate of #4998 Mar 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants