Commit 5edbba6
Fix /dashboard (no trailing slash) returning 404
Starlette's Mount at /dashboard matches /dashboard/... but also catches
bare /dashboard, passing empty path to the sub-app which has no route
for "". Add an explicit GET /dashboard route on the outer app (before
the mount) that 301-redirects to /dashboard/. Browser follows the
redirect transparently.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 8d2ab23 commit 5edbba6
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
508 | 518 | | |
509 | 519 | | |
510 | 520 | | |
| |||
0 commit comments