Skip to main content

How to handle "event submission rejected with_reason: Cors" errors?

Updated over a month ago

Issue

Events sent by the SDK get a 403 response from the server with the message:

{"detail":"event submission rejected with_reason: Cors"}

Applies To

  • All SaaS Customers and Self-Hosted Users

Resolution

Ensure the list of allowed domains contains all the origins/referrer domains used by your application. You can follow the steps below:

  1. Open the network logs in the browser

  2. Go to a page in your app that triggers an event, and subsequently the 403 response

  3. Open the request that is getting the 403 in the network tab

  4. Under "Request" headers find the Referrer header

  5. Add the domain of the referrer header to your list of "Allowed Domains" in the Sentry Web UI project settings

Did this answer your question?