MSP-2267 исправил поиск по строке на поиск по байтам

This commit is contained in:
Павел Комиссаров committed 2025-04-28 14:17:17 +03:00
1 parent 7acd770e26
commit 9808e30cb9
1 file changed
+1 -1
+1 -1
View File
@@ -125,7 +125,7 @@ func Logger( // nolint:gocognit
}
if logBodyFromCurrenRequest {
if enableForceUnescapingUnicode && strings.Contains(string(buf.RequestBody()), "\\u") {
if enableForceUnescapingUnicode && bytes.Contains(buf.RequestBody(), []byte("\\u")) {
fields = append(fields, log.ByteString("request", forceUnescapingUnicode(buf.RequestBody())))
} else {
fields = append(fields, log.ByteString("request", buf.RequestBody()))