fix: recognize case-insensitive signed URL schemes across log paths
This commit is contained in:
@@ -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]+`)
|
||||
|
||||
Reference in New Issue
Block a user