Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Sentry/Protocol/Response.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ internal void AddHeaders(IEnumerable<KeyValuePair<string, IEnumerable<string>>>
{
foreach (var header in headers)
{
// Always skip the Authorization header - we never want to capture this even if SendDefaultPii is true
if (header.Key.Equals("Authorization", StringComparison.OrdinalIgnoreCase))
{
continue;
}
Headers.Add(
header.Key,
string.Join("; ", header.Value)
Expand Down
5 changes: 5 additions & 0 deletions src/Sentry/SentryRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ internal void AddHeaders(IEnumerable<KeyValuePair<string, IEnumerable<string>>>
{
foreach (var header in headers)
{
// Always skip the Authorization header - we never want to capture this even if SendDefaultPii is true
if (header.Key.Equals("Authorization", StringComparison.OrdinalIgnoreCase))
{
continue;
}
Headers.Add(header.Key, string.Join("; ", header.Value));
}
}
Expand Down
Loading