Include auth type in http log

This commit is contained in:
Hannah von Reth 2020-12-09 15:39:01 +01:00 committed by Kevin Ottens
parent f6f7789afa
commit 157d526129
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -53,7 +53,8 @@ void logHttp(const QByteArray &verb, const QString &url, const QByteArray &id, c
for (const auto &it : header) {
stream << it.first << ": ";
if (it.first == "Authorization") {
stream << "[redacted]";
stream << (it.second.startsWith("Bearer ") ? "Bearer" : "Basic");
stream << " [redacted]";
} else {
stream << it.second;
}