From 0d713e667112b227e3f135147c123e2a17cb2aff Mon Sep 17 00:00:00 2001 From: Jason Fesler Date: Sat, 18 Apr 2020 18:17:37 -0700 Subject: test --- mod_ip.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mod_ip.c') diff --git a/mod_ip.c b/mod_ip.c index b00c204..93a96a7 100644 --- a/mod_ip.c +++ b/mod_ip.c @@ -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")); -- cgit v1.2.3