We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Once Uvicorn is upgraded to v0.26 or beyond, any path parameters type gets the value of --root-path prepended to them.
path
No response
from pathlib import Path from litestar import Litestar from litestar.handlers import get @get(path=["/", "/{path:path}"], sync_to_thread=False) def pathfinder(path: Path | None) -> str: return f"path: {path}" app = Litestar(route_handlers=[pathfinder], debug=True)
Uvicorn <0.26: 1. uvicorn mcve:app --root-path /test 2. curl http://localhost:8000/myPath -> "path: /myPath" Uvicorn >=0.26: 1. uvicorn mcve:app --root-path /test 2. curl http://localhost:8000/myPath -> "path: /test/myPath"
2.5.2
Note
While we are open for sponsoring on GitHub Sponsors and OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered:
Related to #2998.
Sorry, something went wrong.
root_path
This issue has been closed in #3039. The change will be included in the upcoming patch release.
A fix for this issue has been released in v2.5.3
Successfully merging a pull request may close this issue.
Description
Once Uvicorn is upgraded to v0.26 or beyond, any
path
parameters type gets the value of --root-path prepended to them.URL to code causing the issue
No response
MCVE
Steps to reproduce
Screenshots
No response
Logs
No response
Litestar Version
2.5.2
Platform
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: