Hi all,
This patch adds an X-Forwarded-For header to the proxied request,
allowing the backend server access to the client IP address.
Regards,
Graham
--
-----------------------------------------
[EMAIL PROTECTED] "There's a moon
over Bourbon Street
tonight..."diff -u3 -r --exclude=CVS
../../../../pristine/httpd-proxy/module-2.0/proxy_http.c proxy/proxy_http.c
--- ../../../../pristine/httpd-proxy/module-2.0/proxy_http.c Wed Mar 14
23:27:55 2001
+++ proxy/proxy_http.c Mon Mar 19 14:21:23 2001
@@ -342,6 +342,10 @@
);
}
+ /* Add X-Forwarded-For: so that the upstream has a chance to
+ determine, where the original request came from. */
+ apr_table_mergen(r->headers_in, "X-Forwarded-For",
r->connection->remote_ip);
+
/* send request headers */
reqhdrs_arr = apr_table_elts(r->headers_in);
reqhdrs = (apr_table_entry_t *) reqhdrs_arr->elts;