fief-dev / fief

Users and authentication management SaaS
https://www.fief.dev
Other
538 stars 44 forks source link

Trailing slash is mandatory for /admin/ endpoint #138

Closed frankie567 closed 1 year ago

frankie567 commented 1 year ago

Describe the bug

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:

  1. Go to http://localhost:8000/admin
  2. 404 error

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.