Dealing with CORS Issues

If your frontend and backend are hosted on different domains (for example, your frontend is on https://example.com and your backend is on https://api.example.com), and the frontend does XHR/fetch requests to your backend, you'll need to configure your backend CORS headers to ensure requests aren't blocked.

Configure your backend CORS to allow the sentry-trace and baggage headers.

Your server's response header configuration might look like: "Access-Control-Allow-Headers: sentry-trace, baggage". Your configuration will be specific to your setup.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").