This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Add configuration option to disable API routing. #12122
Labels
good first issue
Easy to fix issues, good for newcomers
Feature request
Is your feature request related to a problem? Please describe.
I'm trying to use
/api
as a landing page that introduces users to the product's API and links them to the full documentation, but I can't find any way to disable Next's API routing - instead, it just tries to turn the page into an API endpoint.https://nextjs.org/docs/api-routes/introduction
Describe the solution you'd like
It'd be useful to have a configuration option to disable API routing for sites built on Next that are purely for marketing purposes.
Describe alternatives you've considered
I couldn't find any relevant configuration options and all of the other issues I was able to find on Google and GitHub involved redirecting from
/api
to a different route. I'm most likely going to go with that option if no other solution presents itself (it's not ideal, but at least the user would get redirected to the right place), but it seems odd that this feature is enforced with no way to opt-out.The text was updated successfully, but these errors were encountered: