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

Allow sentry-trace header in CORS restrictions #449

Merged
merged 1 commit into from Nov 4, 2021

Conversation

tm1000
Copy link
Contributor

@tm1000 tm1000 commented Oct 29, 2021

The way Sentry works in the browser is that it injects itself into the XMLHttpRequest function and adds a sentry-trace header there. This ends up causing calls to the Flagsmith api to fail. I think the proper way to do it is just allow the sentry flags to pass through

Optionally just allow ALL headers. I am not sure why there are header restrictions in the first place.

The way Sentry works in the browser is that it injects itself into the XMLHttpRequest function and adds a sentry-trace header there. This ends up causing calls to the Flagsmith api to fail. I think the proper way to do it is just allow the sentry flags to pass through

Optionally just allow ALL headers. I am not sure why there are header restrictions in the first place.
@matthewelwell
Copy link
Contributor

@tm1000 can you make sure that your PRs have been correctly formatted using black? This is why the unit tests are failing. I will have to look into why the Full E2E tests are failing.

@dabeeeenster dabeeeenster changed the base branch from main to improvement/sentry-cors November 4, 2021 16:48
@dabeeeenster dabeeeenster merged commit 8ea9068 into Flagsmith:improvement/sentry-cors Nov 4, 2021
dabeeeenster added a commit that referenced this pull request Nov 4, 2021
* Update common.py (#449)

The way Sentry works in the browser is that it injects itself into the XMLHttpRequest function and adds a sentry-trace header there. This ends up causing calls to the Flagsmith api to fail. I think the proper way to do it is just allow the sentry flags to pass through

Optionally just allow ALL headers. I am not sure why there are header restrictions in the first place.

* Black formatting

Co-authored-by: Andrew Nagy <tm1000@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants