feat: add CORS middleware for browser-based clients - #121
Conversation
|
Claude finished @koinsaari's task in 2m 5s —— View job Review complete ✅
No blocking issues. This is a clean, well-scoped middleware addition. What it does: Invariant check (per REVIEW.md):
Security: Origin is matched with exact string equality against a server-side configured value before being reflected into Tests: 🟡 Nits (non-blocking):
No blocking issues — approving from a review-feedback standpoint (implementation not requested). Note: I was unable to run |
4ef1a9e to
f706b04
Compare
|
Claude finished @koinsaari's task in 1m 50s —— View job Review complete ✅
No blocking issues. This is a clean, well-scoped middleware addition. What it does: Invariant check (per REVIEW.md):
Security: Origin is matched with exact string equality against a server-side configured value before being reflected into Re-check of the previous review's nits: Both have already been addressed in this exact commit (
Tests: No blocking issues — no new nits to raise. Notes:
|
Restricts cross-origin access to a single configured origin via CORS_ALLOWED_ORIGIN. No-op when unset.
f706b04 to
fb34147
Compare
Summary
internal/middleware.CORS: allows a single configured origin to call the API cross-origin, no-op whenCORS_ALLOWED_ORIGINis unset.cmd/api's/v1mux, applied before the OpenAPI validator so preflightOPTIONSrequests are handled directly.🤖 Generated with Claude Code