chore: add comments

This commit is contained in:
Nathan Shaaban 2022-12-29 19:18:55 +00:00
parent 4b49c68199
commit c14c03f073
2 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,7 @@
### Fixed ### Fixed
- Add `Allow` header to `Resource`'s default responses when no routes are matched. [#2949] - Add `Allow` header to `Resource`'s default responses when no routes are matched. [#2949]
- Hide `Authorization` header in `HttpRequest` Debug output
[#1961]: https://github.com/actix/actix-web/pull/1961 [#1961]: https://github.com/actix/actix-web/pull/1961
[#2265]: https://github.com/actix/actix-web/pull/2265 [#2265]: https://github.com/actix/actix-web/pull/2265

View File

@ -445,6 +445,7 @@ 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() {
// Hide sensitive header from debug output
if key != http::header::AUTHORIZATION { if key != http::header::AUTHORIZATION {
writeln!(f, " {:?}: {:?}", key, val)?; writeln!(f, " {:?}: {:?}", key, val)?;
} }