Skip to content

Commit 23ba7c2

Browse files
authored
truncate long http debug messages (#21466)
1 parent b0c5805 commit 23ba7c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ydb/library/actors/http/http_proxy.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,9 @@ TString GetObfuscatedData(TString data, const THeaders& headers) {
445445
data.replace(pos, x_yacloud_subjecttoken.size(), TString("<obfuscated>"));
446446
}
447447
}
448+
if (data.size() > 1000) {
449+
return data.substr(0, 500) + " --- <truncated> --- " + data.substr(data.size() - 500);
450+
}
448451
return data;
449452
}
450453

0 commit comments

Comments
 (0)