sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

Make CORS configuration more intuitive/obvious

Open danielkhan opened this issue 2 years ago • 1 comments

Problem Statement

As documented here, users need to configure Access-Control-Allow-Headers when the frontend and the backend are on different (sub) domains to allow trace propagation headers to be passed down with XHR requests.

Users may easily miss the docs and end up with a broken experience / spend much time trying to find the problem.

Solution Brainstorm

Here are two possible solutions:

  1. Prominently link to the CORS documentation during setup. This would affect all backend platforms. Consider adding a snippet in an expandable section.
  2. Automatically make all backend SDKs send these response headers - maybe guarded by a config option as part of the default init snippet.

danielkhan avatar Oct 26 '23 08:10 danielkhan