diff options
-rw-r--r-- | mod_ip.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -356,12 +356,15 @@ gen_output (request_rec * r, struct mod_ip_request_t *formdata) char *p = NULL; int added = 0; char *myip = CLIENT_IP(r); + char *realip = escape_string (r, (char *) apr_table_get (r->headers_in, "X-Real-IP")); char *mytype = "ipv4"; char *mysubtype = ""; char *VIA = ""; char *asnlist = NULL; - - + + if realip != NULL && strlen(realip)>0 { + myip=realip + } /* Identify X-Forwarded-For; include in results after stripping characters. */ VIA = escape_string (r, (char *) apr_table_get (r->headers_in, "Via")); |