From e89f3b67bd00f9e30db531e2b346fe485e27d1d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arma=C3=ABl=20Gu=C3=A9neau?= Date: Sun, 1 Dec 2024 14:57:54 +0100 Subject: [PATCH] reverse proxy: also add tag-based headers for redirections --- src/https.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/https.rs b/src/https.rs index 9d92470..78190b4 100644 --- a/src/https.rs +++ b/src/https.rs @@ -371,8 +371,8 @@ async fn do_proxy( reverse_proxy::call(remote_addr.ip(), &to_addr, req).await? }; - if response.status().is_success() { - // (TODO: maybe we want to add these headers even if it's not a success?) + if response.status().is_success() || response.status().is_redirection() { + // (TODO: maybe we want to add these headers even if it's not a success or redirection?) for (header, value) in proxy_to.add_headers.iter() { response.headers_mut().insert( HeaderName::from_bytes(header.as_bytes())?,