From 9d883b58516dc901fda7ae897eaf57941cb375d7 Mon Sep 17 00:00:00 2001 From: eternal-flame-AD Date: Wed, 16 Oct 2024 21:37:04 -0500 Subject: [PATCH] Don't remove host header Signed-off-by: eternal-flame-AD --- src/lib.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 56a6c7b..eff7e92 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -195,8 +195,6 @@ impl< let path_and_query = uri.path_and_query().ok_or(ERR_BAD_REQUEST)?; let state = app.app_state(); - header.remove("host"); - let req = state .backend_client .request( @@ -306,9 +304,9 @@ impl< }; let ctx = app.app_state().ctx_template.clone(); - if let Disposition::Intercept(e) = app.evaluate(ctx, &info).await.0 { return Err(Either::B(e)) } - - header.remove("host"); + if let Disposition::Intercept(e) = app.evaluate(ctx, &info).await.0 { + return Err(Either::B(e)); + } let req = app .app_state()