CORS Config Helper
Configure CORS policies correctly for secure cross-origin API access and troubleshoot common CORS issues.
Usage
Describe your frontend and API setup, and this skill will configure the correct CORS policy.
Examples
- "Configure CORS for my API that serves a React frontend on a different domain"
- "Fix CORS errors when sending authentication cookies cross-origin"
- "Set up CORS for a public API that any origin can access"
Guidelines
- Never use wildcard origins (*) when credentials are required
- Whitelist specific origins instead of allowing all in production
- Cache preflight responses with appropriate max-age
- Include all necessary headers in Access-Control-Allow-Headers
- Test CORS configuration with actual cross-origin requests