Replies: 2 comments 1 reply
-
What's the uvicorn version? If it's not the latest one, try it. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I think I've found where the issue came from. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
The program runs in gunicorn (using the uvicorn worker class) behind a nginx proxy which strips away the root_path (as described in Behind a proxy).
Before fastapi 0.109 an URL with a trailing slash (ex. https://127.0.0.1/wms/hello/) would be redirected to the corresponding URL without the trailing slash (ex. https://127.0.0.1/wms/hello) as expected.
From fastapi 0.109 the redirect no more includes the root_path, so from https://127.0.0.1/wms/hello/ the application redirects to https://127.0.0.1/hello which results in a 404 Not Found error.
Here the headers of the redirect request:
I think the issue is correlated to this one but it's not really the same.
Operating System
Linux
Operating System Details
The server runs on Redhat 8.7
FastAPI Version
0.109.2
Pydantic Version
2.6.1
Python Version
3.9.13
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions