Skip to content

Commit

Permalink
Tower and Actix: Filter out sensitive headers (#665)
Browse files Browse the repository at this point in the history
  • Loading branch information
FSMaxB authored Jun 27, 2024
1 parent e3b0fba commit 172bcd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions sentry-actix/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ fn sentry_request_from_http(request: &ServiceRequest, with_pii: bool) -> Request
headers: request
.headers()
.iter()
.filter(|(_, v)| !v.is_sensitive())
.map(|(k, v)| (k.to_string(), v.to_str().unwrap_or_default().to_string()))
.collect(),
..Default::default()
Expand Down
1 change: 1 addition & 0 deletions sentry-tower/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ where
headers: request
.headers()
.into_iter()
.filter(|(_, value)| !value.is_sensitive())
.map(|(header, value)| {
(
header.to_string(),
Expand Down

0 comments on commit 172bcd4

Please sign in to comment.