Using next.js API to proxify FastAPI #120
Unanswered
matt-grain
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I hadn't considered this before, but it should be possible! So if I understand correctly, you would want to:
I just created an issue to investigate this. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
If I'm not wrong currently the frontend is calling the fastapi backend directly so 2 ports need to be open on internet. And right now the FastAPI docs are available to everyone.
Would it be possible to use next.js API routing to hide the fastapi backend (which could be deployed on the same machine or elsewhere without CORS issues) and that all frontend calls will be managed by next.js ?
Due to this 2 ports constraints, I'm struggling to deploy my app to my current cloud provider (without using a VM)
Thanks !
Beta Was this translation helpful? Give feedback.
All reactions