summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod_ip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mod_ip.c b/mod_ip.c
index 93a96a7..9b5db0d 100644
--- a/mod_ip.c
+++ b/mod_ip.c
@@ -360,6 +360,7 @@ gen_output (request_rec * r, struct mod_ip_request_t *formdata)
char *mytype = "ipv4";
char *mysubtype = "";
char *VIA = "";
+ char *RIP = "";
char *asnlist = NULL;
if realip != NULL && strlen(realip)>0 {
@@ -367,8 +368,11 @@ gen_output (request_rec * r, struct mod_ip_request_t *formdata)
}
/* Identify X-Forwarded-For; include in results after stripping characters. */
+ RIP = escape_string (r, (char *) apr_table_get (r->headers_in, "X-Real-IP"));
VIA = escape_string (r, (char *) apr_table_get (r->headers_in, "Via"));
+ if (strlen(VIA)>0)
+ myip = RIP
if (!myip)
myip = "0.0.0.0 undefined";
if (formdata->testip)