initial support forwarded header
This commit is contained in:
parent
6e7f432aec
commit
a73321cb27
4 changed files with 142 additions and 6 deletions
|
|
@ -87,7 +87,7 @@ where
|
|||
remove_connection_header(headers);
|
||||
// delete hop headers including header.connection
|
||||
remove_hop_header(headers);
|
||||
// X-Forwarded-For
|
||||
// X-Forwarded-For (and Forwarded if exists)
|
||||
add_forwarding_header(headers, client_addr, listen_addr, tls_enabled, &original_uri)?;
|
||||
|
||||
// Add te: trailer if te_trailer
|
||||
|
|
@ -126,7 +126,7 @@ where
|
|||
|
||||
// apply upstream-specific headers given in upstream_option
|
||||
let headers = req.headers_mut();
|
||||
// apply upstream options to header
|
||||
// apply upstream options to header, after X-Forwarded-For is added
|
||||
apply_upstream_options_to_header(headers, &upstream_chosen.uri, upstream_candidates)?;
|
||||
|
||||
// update uri in request
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue