mirror of
https://github.com/storytold/voder-proxy.git
synced 2026-10-19 07:43:12 +00:00
debug by printing all headers
This commit is contained in:
@@ -131,6 +131,10 @@ impl Router {
|
|||||||
fn speak_proxy(req: Request<Body>, remote_addr: SocketAddr, router: Arc<Router>, endpoint: &'static str) -> BoxFut {
|
fn speak_proxy(req: Request<Body>, remote_addr: SocketAddr, router: Arc<Router>, endpoint: &'static str) -> BoxFut {
|
||||||
let mut headers = req.headers().clone();
|
let mut headers = req.headers().clone();
|
||||||
|
|
||||||
|
for (k, v) in headers.iter() {
|
||||||
|
info!("Header: {:?} = {:?}", k, v);
|
||||||
|
}
|
||||||
|
|
||||||
// This is the correct client IP, not the IP of the load balancer.
|
// This is the correct client IP, not the IP of the load balancer.
|
||||||
// We're adding it to the headers so that downstream can use it for rate limiting and logging.
|
// We're adding it to the headers so that downstream can use it for rate limiting and logging.
|
||||||
let forwarded_ip = HeaderValue::from_str(&remote_addr.ip().to_string())
|
let forwarded_ip = HeaderValue::from_str(&remote_addr.ip().to_string())
|
||||||
|
|||||||
Reference in New Issue
Block a user