feat(sentry-apps): send custom headers on all external requests#119530
Merged
cvxluo merged 1 commit intoJul 13, 2026
Conversation
Co-authored-by: Claude <noreply@anthropic.com>
ae5d927 to
0fef7fd
Compare
cvxluo
commented
Jul 13, 2026
| custom_headers = _custom_request_headers(sentry_app) | ||
| send_headers = {**custom_headers, **headers} | ||
| # Since some headers may carry secrets, we mask them to avoid logging them | ||
| loggable_headers = {**mask_header_values(custom_headers), **headers} |
Contributor
Author
There was a problem hiding this comment.
note that we mask all custom headers in the log, rather than just potentially sensitive fields. i figure this is a little easier + more secure if we treat all the custom headers as sensitive.
cvxluo
commented
Jul 13, 2026
| return True | ||
|
|
||
|
|
||
| def _custom_request_headers(sentry_app: SentryApp | RpcSentryApp) -> dict[str, str]: |
Contributor
Author
There was a problem hiding this comment.
this is a relatively inelegant way to check that the feature flag is enabled. we can remove it once we remove the flag
billyvg
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When custom headers are set, send them on all external requests. This can change the headers for custom select form UI components, external issue linking / unlinking, and custom alert rule action UI components