Skip to content

Duplicated root-path on 307 redirection #1186

Answered by HassanAbouelela
tsunday asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  • The frontend hosted at example.com/api/v1
  • The backend hosted at api.com
  • A proxy that converts traffic from example.com/api/v1 to my backend, stripping /api/v1 fr…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tomchristie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1130 on May 13, 2021 14:06.