forked from Deuxfleurs/tricot
Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
2a679f97b6 | |||
|
e89f3b67bd | ||
7540b03cf6 |
1 changed files with 2 additions and 2 deletions
|
@ -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())?,
|
||||
|
|
Loading…
Reference in a new issue