Skip to content

Commit 52cce3f

Browse files
committed
Fixup better header check
1 parent 88780de commit 52cce3f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

local-server/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,11 @@ async fn linkup_request_handler(
283283
let downstream_response_headers = downstream_upgrade_response.headers_mut();
284284

285285
// The headers from the upstream response are more important - trust the upstream server
286-
for upstream_header in upstream_response.headers() {
286+
for (upstream_key, upstream_value) in upstream_response.headers() {
287287
// Except for content encoding headers, cloudflare does _not_ like them..
288-
if !DISALLOWED_HEADERS.contains(&upstream_header.0.to_string().as_str()) {
288+
if !DISALLOWED_HEADERS.contains(&upstream_key.as_str()) {
289289
downstream_response_headers
290-
.insert(upstream_header.0, upstream_header.1.clone());
290+
.insert(upstream_key.clone(), upstream_value.clone());
291291
}
292292
}
293293

0 commit comments

Comments
 (0)