Don't redact :authority pseudo-header field (#300)

This commit is contained in:
M. Mert Yıldıran 2021-09-23 09:12:04 +03:00 committed by GitHub
parent e8ea93cb64
commit 649b733ba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,6 +86,10 @@ func getContentTypeHeaderValue(headers http.Header) string {
}
func isFieldNameSensitive(fieldName string) bool {
if fieldName == ":authority" {
return false
}
name := strings.ToLower(fieldName)
name = strings.ReplaceAll(name, "_", "")
name = strings.ReplaceAll(name, "-", "")