Commit Graph
2 Commits
Author SHA1 Message Date
cupcakearmy b5e1c4b42a chore: cleanup 2026-09-21 21:27:50 +02:00
Matheus Leal 8034b1a501 fix: serve SPA fallback with 200 instead of 404
`ServeDir::not_found_service` wraps the fallback in `SetStatus`, which forces
every response to `404 Not Found`. Client side routes such as `/note/<id>` and
`/about` were therefore served the correct `index.html` but with a 404 status.

Use `ServeDir::fallback` instead, which leaves the status untouched. A note that
genuinely does not exist is still reported as 404 by `/api/notes/<id>`.

Behind a reverse proxy this made effectively every document request show up as a
4xx, skewing error rate dashboards and triggering false alerts.

Fixes #217
2026-09-03 16:09:40 -03:00