registry/internal/api
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yusufhan Saçak 3a39b665ac
fix(api): allow PATCH in CORS so browsers can call the status endpoints (#1436)
The status endpoints (PATCH /v0/servers/{name}/status and the
per-version one) are served with PATCH, but the CORS middleware's
AllowedMethods lists GET/POST/PUT/DELETE/OPTIONS and never PATCH. So a
cross-origin browser preflight for those endpoints comes back without
the allow headers and the browser blocks the actual request. One-line
fix: add PATCH to the allowed methods.

While here, the existing CORS test turned out to be a placeholder that
never reaches the real wrapped handler (its own comments say so), which
is why this went unnoticed. Added a small Handler() accessor and a
proper preflight test that asserts each routed method including PATCH is
allowed.
2026-07-12 21:53:13 +03:00
..
handlers/v0 docs(auth): document fine-grained PAT permission for org publishing (+ pagination-cap test) (#1435) 2026-07-10 18:48:56 -04:00
router metrics: stop counting client-cancelled requests as server errors (#1255) 2026-05-05 05:58:05 -04:00
cors_preflight_test.go fix(api): allow PATCH in CORS so browsers can call the status endpoints (#1436) 2026-07-12 21:53:13 +03:00
cors_test.go feat: add CORS support to registry API (#711) 2025-10-27 18:07:13 +00:00
openapi_compliance_test.go Ensure tests are failing CI (#840) 2025-12-11 09:56:57 +02:00
server.go fix(api): allow PATCH in CORS so browsers can call the status endpoints (#1436) 2026-07-12 21:53:13 +03:00
server_test.go security: fix open redirect and add small hardening (#1227) 2026-04-29 19:14:00 -04:00