hide API-Key from appearing on the tx log

This commit is contained in:
Grahame Grieve 2024-12-02 06:49:22 +03:00
parent cff693eb10
commit 7d54780cad
1 changed files with 7 additions and 2 deletions

View File

@ -63,8 +63,13 @@ public class TextClientLogger extends BaseLogger implements ToolingClientLogger
file.println("\r\n--- "+id+" -----------------\r\nRequest: \r\n");
file.println(method+" "+url+" HTTP/1.0");
if (headers != null) {
for (String s : headers)
file.println(s);
for (String s : headers) {
if (s.startsWith("Api-Key")) {
file.println("Api-Key: xxxxxxxxxxxxxxxx");
} else {
file.println(s);
}
}
}
if (body != null) {
file.println("");