registry/internal/api
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Terry Nederveld 73d2174cec
feat: add CORS support to registry API (#711)
Fixes #710

This PR adds CORS middleware to enable browser-based clients and web
applications to access the registry API.

## Changes

- Add CORSMiddleware in internal/api/cors.go to handle preflight OPTIONS
requests and inject CORS headers
- Integrate CORS middleware into the server middleware stack
- Add CORS configuration options (CORS_ENABLED and CORS_ALLOWED_ORIGIN)

## Testing

- All existing tests pass
- Manual testing confirms CORS headers are present in responses
- OPTIONS preflight requests now return 204 with proper headers

## Configuration

New environment variables:
- MCP_REGISTRY_CORS_ENABLED (default: true)
- MCP_REGISTRY_CORS_ALLOWED_ORIGIN (default: *)
2025-10-27 18:07:13 +00:00
..
handlers/v0 Add support for ECDSA P-384 (#685) 2025-10-24 12:02:33 -06:00
router Introduce a /version API (#667) 2025-10-15 17:24:46 +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 Introduce a /version API (#667) 2025-10-15 17:24:46 +03:00
server.go feat: add CORS support to registry API (#711) 2025-10-27 18:07:13 +00:00
server_test.go fix: add HTTP middleware to redirect trailing slash URLs to canonical form (#420) 2025-09-10 13:14:59 -07:00