hide authorization header in HttpRequest Debug

This commit is contained in:
Nathan Shaaban 2022-12-29 19:08:16 +00:00
parent 06c3513bc0
commit 4b49c68199
1 changed files with 3 additions and 1 deletions

View File

@ -445,8 +445,10 @@ impl fmt::Debug for HttpRequest {
} }
writeln!(f, " headers:")?; writeln!(f, " headers:")?;
for (key, val) in self.headers().iter() { for (key, val) in self.headers().iter() {
if key != http::header::AUTHORIZATION {
writeln!(f, " {:?}: {:?}", key, val)?; writeln!(f, " {:?}: {:?}", key, val)?;
} }
}
Ok(()) Ok(())
} }
} }