Performance improvements, type changes

This commit is contained in:
Ara Sadoyan
2025-11-26 12:12:41 +01:00
parent 7a839065e6
commit 8ba8d32df1
8 changed files with 27 additions and 27 deletions

View File

@@ -186,7 +186,7 @@ impl ProxyHttp for LB {
upstream_request.insert_header("Host", hostname)?;
}
if let Some(peer) = ctx.upstream_peer.as_ref() {
upstream_request.insert_header("X-Forwarded-For", peer.address.as_str())?;
upstream_request.insert_header("X-Forwarded-For", peer.address.to_string())?;
}
if let Some(headers) = self.get_header(ctx.hostname.as_ref().unwrap_or(&"localhost".to_string()), session.req_header().uri.path()) {