Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry-trace may cause CORS errors #4114

Closed
0xshellming opened this issue Nov 3, 2021 · 3 comments
Closed

Sentry-trace may cause CORS errors #4114

0xshellming opened this issue Nov 3, 2021 · 3 comments

Comments

@0xshellming
Copy link

Problem Statement

image

We initialize sentry according to the official documents whitout Setting tracingOrigins.

Sentry will add sentry-trace to HTTP-REQUEST-HEADER automatic. This operation will cause CORS Error

If user upgrade the Sentry to the Vesion without change the tracingOrigins config. This can cause serious errors.

It would be presumptuous to add http header by default config, this operation is destructive.

We recommend that sentry-trace header to be turned off by default.


"@sentry/browser": "^6.13.3",
"@sentry/integrations": "^6.13.3",
"@sentry/tracing": "^6.13.3"

Solution Brainstorm

We recommend that sentry-trace header to be turned off by default.

@getsentry-release
Copy link

Routing to @getsentry/team-webplatform for triage. ⏲️

@rhcarvalho rhcarvalho changed the title Centry-trace Cause CORS Error Sentry-trace may cause CORS errors Nov 3, 2021
@rhcarvalho rhcarvalho transferred this issue from getsentry/sentry Nov 3, 2021
@rhcarvalho
Copy link
Contributor

We can definitely improve the docs by bringing tracingOrigins into code snippets earlier. Changing the default behavior requires more deliberation, as it also impacts trace propagation.

@vladanpaunovic
Copy link
Contributor

@QuXiaoMing, please refer to the documentation for tracingOrigins here.

We will look for ways to improve our documentation and communicate this better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants