fix: recognize case-insensitive signed URL schemes across log paths

This commit is contained in:
2026-10-10 05:46:32 +08:00
parent dd98df8cb4
commit cd3fe5d00a
2 changed files with 55 additions and 1 deletions
+1 -1
View File
@@ -158,7 +158,7 @@ func RedactJSON(body []byte) (string, error) {
}
var (
urlInText = regexp.MustCompile(`(?:https?|wss?)://[^\s<>"']+`)
urlInText = regexp.MustCompile(`(?i)(?:https?|wss?)://[^\s<>"']+`)
authHeaderInText = regexp.MustCompile(`(?im)\b(?:proxy-authorization|authorization|set-cookie|cookie)["']?\s*[=:]\s*[^\r\n]+`)
privatePEMInText = regexp.MustCompile(`(?s)-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----.*?(?:-----END [A-Z0-9 ]*PRIVATE KEY-----|$)`)
sensitiveTextLine = regexp.MustCompile(`(?im)\b(?:prompt|system[_-]?prompt|messages|transcript|text|content|audio|closing[_-]?remark)\s*[=:]\s*[^\r\n]+`)