Commit bef2c6e
Fortinbra
fix: return 404 for unmatched API routes instead of SPA fallback
MapFallback was catching all unmatched routes including /api/* paths,
returning 200 OK with index.html. This caused the CI test
Parse_EndpointRemoved_ReturnsErrorStatus to fail because the removed
/api/v1/import/parse endpoint returned 200 instead of 404.
Added a guard to return 404 for requests starting with /api/ so
API consumers get proper error responses while SPA routing still
works for all other paths.1 parent 7ec6c43 commit bef2c6e
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
220 | 227 | | |
221 | 228 | | |
222 | 229 | | |
| |||
0 commit comments