Running FastAPI-Users behind a reverse proxy #1362
Replies: 3 comments 1 reply
-
Can you provide the code for FastAPI-Users and the Nginx settings? |
Beta Was this translation helpful? Give feedback.
-
I don't think it's specifically related to FastAPI Users. When running behind a proxy, there are a few things to take into account. I'll suggest you to take a look at Uvicorn documentation: https://www.uvicorn.org/deployment/#running-behind-nginx Regarding proxy root, I think you should set the |
Beta Was this translation helpful? Give feedback.
-
Indeed, I don't think this has anything to do with FastAPI Users in particular either. I have no problems using FastAPI Users with Nginx. I don't have a deep understanding of how Nginx and Uvciron work and how they are set up, so I don't know everything about your Nginx setup. I don't know much about Nginx usage, and I don't know if you know much about Nginx. But when I use Nginx, the front-end and back-end locations are separate. I see that your location is written the same and I don't know if there is any problem. You can try it first, create a simple API and setup only the backend in Nginx. Or you can try to see where to modify FastAPI. For example your API is
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am utilizing FastAPI-Users within an Nginx reverse proxy setup where the root is set to "/api-service". Nevertheless, the application constructs the callback/redirect URI without considering the reverse proxy root. What steps should I take to address this problem?
Beta Was this translation helpful? Give feedback.
All reactions