Repository navigation
Commit a2d7671
committed
api: only redirect GET requests on unversioned paths
The wildcard /api/* redirect was registered with HandleFunc which
matches all HTTP methods. This prevents chi from returning 405 on
versioned routes when the method is not allowed, causing infinite
redirect loops instead. Restrict the redirect to GET only.
Fixes: a214945 ("api: redirect unversioned /api requests to latest version")
Signed-off-by: Robin Jarry <robin@jarry.cc>1 parent ff2994c commit a2d7671
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
0 commit comments