Skip to main content

Troubleshooting CORS Issues

Symptoms

  • "Access-Control-Allow-Origin" errors in browser console
  • Requests work in cURL but fail from a web application
  • Preflight (OPTIONS) requests failing

Solutions

Simulation CORS Configuration

  1. Open simulation settings
  2. Go to CORS Configuration
  3. Add your application's origin (e.g., http://localhost:3000)
  4. Save and test

Common CORS Origins to Allow

http://localhost:3000
http://localhost:5173
https://your-app.example.com

Wildcard Origin

For development, you can use * to allow all origins. Do not use this in production.

Missing Headers

Ensure these headers are included in CORS configuration:

  • Authorization
  • Content-Type
  • X-Requested-With