Is it possible to disable API routes? #11785
-
|
We currently have a back-end implemented with Java, but we're wanting to host the front-end using Next.js. Is it possible to disable API routes so calls to |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 5 replies
-
|
What if you don't have a |
Beta Was this translation helpful? Give feedback.
-
|
If you want to proxy all |
Beta Was this translation helpful? Give feedback.
-
|
you could have a reverse proxy in front to do that routing for you. nginx is a good one, but anything that you are familiar with would work. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks all for your help. We're going to look into both the path rewrites and using Nginx as a reverse proxy. |
Beta Was this translation helpful? Give feedback.
-
|
@Janpot what happens if I rewrite requests to Just because it would be easier to do some testing and switching around between environments. |
Beta Was this translation helpful? Give feedback.
-
|
I have done this i am getting two problems with this.
|
Beta Was this translation helpful? Give feedback.
If you want to proxy all
/api/...calls to another backend, you should be able to use rewrites for that: #9081