diff options
author | Jason Fesler <jfesler@Jasons-MacBook-Pro-2.local> | 2020-04-18 18:25:42 -0700 |
---|---|---|
committer | Jason Fesler <jfesler@Jasons-MacBook-Pro-2.local> | 2020-04-18 18:25:42 -0700 |
commit | 49879a95d587c74a1675cee4a3d00fba3fbc351e (patch) | |
tree | ea4ca7449f67a23737872e0b1358977aad000693 /mod_ip.c | |
parent | 0d713e667112b227e3f135147c123e2a17cb2aff (diff) | |
download | mod_ip-49879a95d587c74a1675cee4a3d00fba3fbc351e.tar.gz mod_ip-49879a95d587c74a1675cee4a3d00fba3fbc351e.zip |
X-Real-IP
Diffstat (limited to 'mod_ip.c')
-rw-r--r-- | mod_ip.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) |