When accessing the admin dashboard on http://localhost:8000/admin (no trailing slash), a 404 is raised. The dashboard only responds to http://localhost:8000/admin/ (with trailing slash).
To Reproduce
Steps to reproduce the behavior:
Go to http://localhost:8000/admin
404 error
Expected behavior
The server should automatically redirect to the path with a trailing slash.
Configuration
Cloud or self-hosted: Both
Additional context
This doesn't happen for roots on APIRouter (like /admin/clients or /admin/api/clients) where the redirection is automatically done. We should check if there is a special handling for this in Starlette/FastAPI to find the best solution.
Describe the bug
When accessing the admin dashboard on
http://localhost:8000/admin
(no trailing slash), a 404 is raised. The dashboard only responds tohttp://localhost:8000/admin/
(with trailing slash).To Reproduce
Steps to reproduce the behavior:
http://localhost:8000/admin
Expected behavior
The server should automatically redirect to the path with a trailing slash.
Configuration
Additional context
This doesn't happen for roots on
APIRouter
(like/admin/clients
or/admin/api/clients
) where the redirection is automatically done. We should check if there is a special handling for this in Starlette/FastAPI to find the best solution.