You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related, on the 200 path: configureWebAnnoHeadersFor() emits Allow: GET,OPTIONS,HEAD,PUT,PATCH,DELETE,POST, advertising methods some routes reject with 405.
We are noticing that the 405 response codes occur as expected but their Allow header value can be missing or incorrect. Check all instances of where a 405 is returned and the resulting 'Allow' header. Line up the 'Allow' header value with the actual list of allowed methods. Do not emit method names that are not allowed.
Resolved by #295 (fix: include accurate Allow headers on 405 responses), merged to main as 5702087. The branch was named for #287 and the merge body did not reference this issue, so it stayed open.
Verified against a running instance. All 20 405 fallbacks emit an Allow header whose value matches the verbs actually registered on that route:
No method is advertised that the route rejects. Every HEAD in the table above returns a 200 against a real object, including HEAD /v1/api/query via controller.queryHeadRequest. POST on the patch routes is genuinely supported through X-HTTP-Method-Override.
The 200-path concern is handled too: configureWebAnnoHeadersFor() in utils.js no longer emits Allow. The only remaining writes of that header in non-test code are the two 405 emitters in rest.js.
Regression coverage is in routes/__tests__/route_wrappers.test.js, which table-drives all 20 routes and derives the expected Allow from each router's own route.methods rather than hard-coding strings, so a route that gains or loses a verb without updating its fallback will fail. Full suite passes at 240/240.
Two smaller Allow accuracy gaps that fall outside the scope of this issue are tracked in #318.
Activity
thehabes commentedon Sep 24, 2026
Resolved by #295 (
fix: include accurate Allow headers on 405 responses), merged tomainas 5702087. The branch was named for #287 and the merge body did not reference this issue, so it stayed open.Verified against a running instance. All 20 405 fallbacks emit an
Allowheader whose value matches the verbs actually registered on that route:/v1/api/queryPOST,HEAD/v1/api/search,/v1/api/search/phrasePOST/v1/id/:_idGET,HEAD/v1/id/:_id/expandedGET,POST,HEAD/v1/since/:_id,/v1/history/:_idGET,HEAD/v1/api/create,/v1/api/bulkCreatePOST/v1/api/update,/v1/api/overwrite,/v1/api/bulkUpdatePUT/v1/api/patch,/v1/api/set,/v1/api/unsetPATCH,POST/v1/api/release/:_idPATCH/v1/api/delete/:_idDELETE/gog/id/:_idGET,HEAD/gog/fragmentsInManuscript,/gog/glossesInManuscriptPOSTNo method is advertised that the route rejects. Every
HEADin the table above returns a 200 against a real object, includingHEAD /v1/api/queryviacontroller.queryHeadRequest.POSTon the patch routes is genuinely supported throughX-HTTP-Method-Override.The 200-path concern is handled too:
configureWebAnnoHeadersFor()inutils.jsno longer emitsAllow. The only remaining writes of that header in non-test code are the two 405 emitters inrest.js.Regression coverage is in
routes/__tests__/route_wrappers.test.js, which table-drives all 20 routes and derives the expectedAllowfrom each router's ownroute.methodsrather than hard-coding strings, so a route that gains or loses a verb without updating its fallback will fail. Full suite passes at 240/240.Two smaller
Allowaccuracy gaps that fall outside the scope of this issue are tracked in #318.