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
{{ message }}
Repository navigation
Follow-ups to #285: API-only banner points to a CDN-backed /api/docs, banner test not strict, 405 Allow ignores bare /api #300
Nits from the review of #285 (#281, merged as 72cc29cf). Details are in the review comment on #285.
F1 — the banner points to a page that may not load.cmd/server/main.go (~662): the API-only banner now points to /api/docs. That page is a Swagger UI shell whose CSS and JS load only from an external CDN (openapi.go ~1039/1049). API-only deployments may have no outbound internet, so consider naming /api/spec (the raw OpenAPI document) as well, or instead.
F2 — the banner test does not tie the URL to the banner.TestAPIOnlyBannerPointsToExistingEndpoint checks that the body contains /api/docs and then fetches the literal /api/docs. Extract the URL from the banner and fetch that, so a banner that only mentions /api/docs in passing cannot pass.
F3 — latent: allowedMethodsForPath ignores bare /api. In cmd/server/api_fallback.go (~73), it filters on strings.HasPrefix(path, "/api/"), which excludes exactly /api. The shadow check now covers bare /api, but the 405/Allow computation does not. Add the case and a test.
Activity
test(server): extract banner's real pointer, assert offline JSON + ba…
Merge pull request #320 from dborup/codex/issue-300-api-fallback-nits
dborup commentedon Oct 7, 2026
Fixed by #320 (merged as
6444294d938083f6d935d0445c27bc6a7bbf360e).