-
The logic to get the route path is using regex to remove the prefix. This had two potential issues. On one hand, this could produce unexpected results in case of using regex special characters like Lines 96 to 99 in 554f368 I checked PR #2400 which introduced this function, and also https://fastapi.tiangolo.com/advanced/behind-a-proxy/#setting-the-root_path-in-the-fastapi-app, but nowhere it's mentioned that the I have already tested the change and there is some small improvement (~1-2%) in the number of RPS. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
I'm guessing the regex nature of the mount path is accidental, not intentional. I think the
The I have a fix and I can send a PR based on the outcome of this discussion: master...shalabhc:starlette:shalabhc/fix-root-path-matching |
Beta Was this translation helpful? Give feedback.
-
Would be nice to hear from maintainers confirming what the logic should be so that PRs could be sent out for review. |
Beta Was this translation helpful? Give feedback.
-
I'm going to merge this: #2600. Can we still use |
Beta Was this translation helpful? Give feedback.
-
should we close this? |
Beta Was this translation helpful? Give feedback.
It looks like what you are saying makes sense.
There were so many wrongly issues about root path, that my brain just ignored when I see the words, sorry.