Do not print auth token to logs

This commit is contained in:
Brahim Hadriche committed 2025-05-11 20:05:10 -04:00
1 parent af12ac43be
commit 9b58bf47ad
2 files changed
+10 -2

No files matched your search

@@ -49,7 +49,7 @@ class LongPoller
LogInfo(`Sending long polling GET ${url}`, "ID:", socket.GetID())
#if DEBUG
? `════════ curl command ════════\n${m.ToCurlCommand()}\n══════════════════════════════`
? `======== curl command ========\n${m.ToCurlCommand()}\n==============================`
#end if
message = `GET ${urlObject.path} HTTP/1.1\r\n`
@@ -321,7 +321,15 @@ namespace HttpClient
if m._headers <> invalid
for each key in m._headers
command += ` \\\n -H '${key}: ${m._headers[key]}'`
#if DEBUG
command += ` \\\n -H '${key}: ${m._headers[key]}'`
#else
if LCase(key) = "authorization"
command += ` \\\n -H '${key}: <REDACTED>'`
else
command += ` \\\n -H '${key}: ${m._headers[key]}'`
end if
#end if
end for
end if