From 1f2ad8da005b941adaad2ba457aa9ef7c1d99f89 Mon Sep 17 00:00:00 2001 From: Jari Date: Wed, 25 Jan 2023 18:14:59 -0600 Subject: [PATCH] Scrub basic auth header from logs (#834) --- src/confighttp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/confighttp.cpp b/src/confighttp.cpp index ecf7c39b..e86ca9c1 100644 --- a/src/confighttp.cpp +++ b/src/confighttp.cpp @@ -56,7 +56,7 @@ void print_req(const req_https_t &request) { BOOST_LOG(debug) << "DESTINATION :: "sv << request->path; for(auto &[name, val] : request->header) { - BOOST_LOG(debug) << name << " -- " << val; + BOOST_LOG(debug) << name << " -- " << (name == "Authorization" ? "CREDENTIALS REDACTED" : val); } BOOST_LOG(debug) << " [--] "sv;