aboutsummaryrefslogtreecommitdiff
path: root/src/reverse_proxy.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/reverse_proxy.rs')
-rw-r--r--src/reverse_proxy.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/reverse_proxy.rs b/src/reverse_proxy.rs
index 1768724..401f4b1 100644
--- a/src/reverse_proxy.rs
+++ b/src/reverse_proxy.rs
@@ -72,7 +72,6 @@ fn create_proxied_request<B>(
*builder.headers_mut().unwrap() = remove_hop_headers(request.headers());
-
// If request does not have host header, add it from original URI authority
let host_header_name = "host";
if let Some(authority) = request.uri().authority() {
@@ -100,7 +99,10 @@ fn create_proxied_request<B>(
}
}
- builder.headers_mut().unwrap().insert(HeaderName::from_bytes(b"x-forwarded-proto")?, "https".try_into()?);
+ builder.headers_mut().unwrap().insert(
+ HeaderName::from_bytes(b"x-forwarded-proto")?,
+ "https".try_into()?,
+ );
if let Some(conn) = request.headers().get("connection") {
if conn.to_str()?.to_lowercase() == "upgrade" {