summaryrefslogtreecommitdiff
path: root/mod_ip.c
diff options
context:
space:
mode:
authorJason Fesler <jfesler@gigo.com>2014-09-14 20:00:34 -0700
committerJason Fesler <jfesler@gigo.com>2014-09-14 20:00:34 -0700
commit081b79910a3f1a8e075875ea6419bf0f8df76fc4 (patch)
tree6c44f3ea6b1f31c90fc2198faa0e3793fcf2ac19 /mod_ip.c
parent1eb61f3171f2cd81d741f8f31ef62beda778e942 (diff)
parent828bf6b540b5d4af03cb326462d5d7cd167ab95f (diff)
downloadmod_ip-081b79910a3f1a8e075875ea6419bf0f8df76fc4.tar.gz
mod_ip-081b79910a3f1a8e075875ea6419bf0f8df76fc4.zip
Merge pull request #1 from delan/patch-1
allow falling-sky to run behind a reverse proxy using Apache >= 2.4
Diffstat (limited to 'mod_ip.c')
-rw-r--r--mod_ip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mod_ip.c b/mod_ip.c
index f1ed7a3..b00c204 100644
--- a/mod_ip.c
+++ b/mod_ip.c
@@ -122,9 +122,9 @@ const char *padding_buffer = "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldH
#if AP_SERVER_MAJORVERSION_NUMBER > 2 || \
(AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER >= 4)
-#define CLIENT_IP(conn) ((conn)->client_ip)
+#define CLIENT_IP(request) ((request)->useragent_ip)
#else
-#define CLIENT_IP(conn) ((conn)->remote_ip)
+#define CLIENT_IP(request) ((request)->connection->remote_ip)
#endif
typedef struct mod_ip_request_t
@@ -355,7 +355,7 @@ gen_output (request_rec * r, struct mod_ip_request_t *formdata)
char *padding = ",\"padding\":\"";
char *p = NULL;
int added = 0;
- char *myip = CLIENT_IP(r->connection);
+ char *myip = CLIENT_IP(r);
char *mytype = "ipv4";
char *mysubtype = "";
char *VIA = "";