aboutsummaryrefslogtreecommitdiff
path: root/src/https.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/https.rs')
-rw-r--r--src/https.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/https.rs b/src/https.rs
index 43a93e2..3621e4f 100644
--- a/src/https.rs
+++ b/src/https.rs
@@ -5,10 +5,10 @@ use anyhow::Result;
use log::*;
use futures::FutureExt;
+use http::header::{HeaderName, HeaderValue};
use hyper::server::conn::Http;
use hyper::service::service_fn;
use hyper::{Body, Request, Response, StatusCode};
-use http::header::{HeaderName, HeaderValue};
use tokio::net::TcpListener;
use tokio::sync::watch;
use tokio_rustls::TlsAcceptor;
@@ -121,7 +121,10 @@ async fn handle(
let mut response = reverse_proxy::call(remote_addr.ip(), &to_addr, req).await?;
for (header, value) in proxy_to.add_headers.iter() {
- response.headers_mut().insert(HeaderName::from_bytes(header.as_bytes())?, HeaderValue::from_str(value)?);
+ response.headers_mut().insert(
+ HeaderName::from_bytes(header.as_bytes())?,
+ HeaderValue::from_str(value)?,
+ );
}
Ok(response)