diff options
author | ilnaz <ilnaz@ydb.tech> | 2023-11-14 00:51:45 +0300 |
---|---|---|
committer | ilnaz <ilnaz@ydb.tech> | 2023-11-14 01:12:56 +0300 |
commit | 669ccf043f259665d921b6e64b6f81d0c8946de0 (patch) | |
tree | 389b2ab0f52c27b5dbc97c4167910e2e5cbefb85 | |
parent | a432177d3a985eb86bc663932e91435875aa7f49 (diff) | |
download | ydb-669ccf043f259665d921b6e64b6f81d0c8946de0.tar.gz |
Hide TVM tickets KIKIMR-20105
-rw-r--r-- | ydb/core/cms/http.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ydb/core/cms/http.cpp b/ydb/core/cms/http.cpp index 959a0c5274..1c508f2723 100644 --- a/ydb/core/cms/http.cpp +++ b/ydb/core/cms/http.cpp @@ -146,6 +146,11 @@ private: ctx.Send(ev->Sender, new NMon::TEvHttpInfoRes(response.Str(), 0, NMon::IEvHttpInfoRes::EContentType::Custom)); } + static bool IsHiddenHeader(const TString& headerName) { + return stricmp(headerName.data(), "Authorization") == 0 + || stricmp(headerName.data(), "X-Ya-Service-Ticket") == 0; + } + static TString DumpRequest(const NMonitoring::IMonHttpRequest& request) { TStringBuilder result; result << "{"; @@ -155,7 +160,7 @@ private: result << " Headers {"; for (const auto& header : request.GetHeaders()) { - if (stricmp(header.Name().data(), "Authorization") == 0) { + if (IsHiddenHeader(header.Name())) { continue; } |