Skip to content

Commit

Permalink
Revert header name
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryuga2967 committed Apr 17, 2024
1 parent ea30e19 commit 61cf725
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl ProxyHttp for MyGateWay {
"Cannot found such container",
)));

let endpoint_key = match headers.get("Via").map(|v| v.to_str()) {
let endpoint_key = match headers.get("X-Jaram-Container").map(|v| v.to_str()) {
Some(v) => match v {
Ok(v) => v,
Err(_) => return not_found,
Expand Down Expand Up @@ -160,8 +160,12 @@ impl ProxyHttp for MyGateWay {
.insert_header("Server", "MyGateWay")
.unwrap();

upstream_response
.insert_header("X-Forwarded-Path", ctx.host.to_owned())
.unwrap();

upstream_response.remove_header("alt-svc");
upstream_response.remove_header("Via");
upstream_response.remove_header("X-Jaram-Container");

Ok(())
}
Expand Down

0 comments on commit 61cf725

Please sign in to comment.