-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
Provide an option to configure the API route path #8123
Comments
It's actually not super simple to change it, and I'd rather not if not really required. We have talked about a page-level opt-out thought, but haven't really had community interest until now. |
That would work for our use case. Will take a look at making this work. Any things I should pay extra attention to? |
It's slightly complicated as this also ties into the serverless target and hosting (@now/next). I'll have @huv1k take a look 👍 |
Closing this in favor of #9081 |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Feature request
Is your feature request related to a problem? Please describe.
Next.js v9.0.0 hard codes the route name of the API path:
/api/
.https://github.com/zeit/next.js/blob/71f9288a54c32420a18a07035ea7a73c9c3c50e5/packages/next/lib/constants.ts#L19
In Material-UI, we host pages under the
/api/
folder. For instance: https://v3.material-ui.com/api/app-bar/. It forces us to rename this folder. This has an SEO impact.Describe the solution you'd like
We would be interested in having an option to configure this path. For instance, I could imagine something like:
next.config.js
Additional context
https://github.com/zeit/next.js/blob/71f9288a54c32420a18a07035ea7a73c9c3c50e5/packages/next/build/entries.ts#L51
The text was updated successfully, but these errors were encountered: