Duplicated root-path on 307 redirection #1186
-
Starlette redirects on missing or redundant trailing slash. In pair with additional To reproduce
Expected behaviorStarlette redirects to Actual behaviorStarlette redirects to Debugging materialEnvironment
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I tested this with Windows, Python 3.9, on the master branch of starlette, but could not reproduce. Making a request to This seems like a misunderstanding of what root path does. Admittedly, the documentation on this option is a bit limited. fastapi has a better description of what the option does here. To demonstrate this issue, there will be three parts to my app:
Navigating to Without the proxy, the response would indeed be a 404. If you look at the logs, they'll say the 404 was at |
Beta Was this translation helpful? Give feedback.
I tested this with Windows, Python 3.9, on the master branch of starlette, but could not reproduce. Making a request to
/api/v1/products/
would immediately 404 with no redirections. I could however get what you described by making the request directly to/products/
. That is not a bug.This seems like a misunderstanding of what root path does. Admittedly, the documentation on this option is a bit limited. fastapi has a better description of what the option does here.
To demonstrate this issue, there will be three parts to my app:
example.com/api/v1
api.com
example.com/api/v1
to my backend, stripping/api/v1
fr…