Skip to content

Commit

Permalink
Update library/swift/HeadersBuilder.swift
Browse files Browse the repository at this point in the history
Co-authored-by: JP Simard <[email protected]>

Signed-off-by: Rafał Augustyniak <[email protected]>
  • Loading branch information
Augustyniak authored Jun 28, 2022
1 parent 2a5085a commit b9d1dd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/swift/HeadersBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ private let kRestrictedPrefixes = [":", "x-envoy-mobile"]

private func isRestrictedHeader(name: String) -> Bool {
let isHostHeader = name.caseInsensitiveCompare("host") == .orderedSame
let hasRestrictedPrefix = kRestrictedPrefixes
lazy var hasRestrictedPrefix = kRestrictedPrefixes
.contains { name.range(of: $0, options: [.caseInsensitive, .anchored]) != nil }
return isHostHeader || hasRestrictedPrefix
}
Expand Down

0 comments on commit b9d1dd9

Please sign in to comment.