sentry-javascript
sentry-javascript copied to clipboard
Make CORS configuration more intuitive/obvious
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:
- Prominently link to the CORS documentation during setup. This would affect all backend platforms. Consider adding a snippet in an expandable section.
- Automatically make all backend SDKs send these response headers - maybe guarded by a config option as part of the default
initsnippet.