Repository navigation
Commit f484834
committed
api: fix redirect loop on unregistered sub-paths
The catch-all /api/* handler redirects unversioned paths to the latest
API version. When the path already contains a version prefix (e.g.
/api/1.4/patches/123/mbox), the redirect prepends another version
prefix, causing an infinite redirect chain. Return 404 instead when the
path already starts with a known version.
Signed-off-by: Robin Jarry <robin@jarry.cc>1 parent 3e9e553 commit f484834
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
250 | 257 | | |
251 | 258 | | |
252 | 259 | | |
| |||
0 commit comments