fix: dont leak authorization and cookie header in reports
This commit is contained in:
parent
967743e925
commit
2e21ad2514
1 changed files with 7 additions and 1 deletions
|
|
@ -1944,8 +1944,14 @@ impl RustyPipeQuery {
|
||||||
request
|
request
|
||||||
.headers()
|
.headers()
|
||||||
.iter()
|
.iter()
|
||||||
|
.filter(|(k, _)| k != &header::COOKIE)
|
||||||
.map(|(k, v)| {
|
.map(|(k, v)| {
|
||||||
(k.as_str(), v.to_str().unwrap_or_default().to_owned())
|
let vstr = if k == header::AUTHORIZATION {
|
||||||
|
"[redacted]"
|
||||||
|
} else {
|
||||||
|
v.to_str().unwrap_or_default()
|
||||||
|
};
|
||||||
|
(k.as_str(), vstr.to_owned())
|
||||||
})
|
})
|
||||||
.collect(),
|
.collect(),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Reference in a new issue