aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README4
-rw-r--r--src/vmod_remoteip.vcc2
2 files changed, 3 insertions, 3 deletions
diff --git a/README b/README
index 18e8653..30140c4 100644
--- a/README
+++ b/README
@@ -28,14 +28,14 @@ An example of using this module:
acl allowed {
"127.0.0.1";
...
}
sub vcl_recv {
- set resp.http.x-real-ip = remoteip.get(resp.http.X-Forwarded-For);
- if (std.ip(resp.http.x-real-ip) ~ allowed) {
+ set req.http.x-real-ip = remoteip.get(req.http.X-Forwarded-For);
+ if (std.ip(req.http.x-real-ip) ~ allowed) {
...
}
}
Installation
------------
diff --git a/src/vmod_remoteip.vcc b/src/vmod_remoteip.vcc
index b46aef5..55b161e 100644
--- a/src/vmod_remoteip.vcc
+++ b/src/vmod_remoteip.vcc
@@ -45,13 +45,13 @@ EXAMPLE
sub vcl_init {
remoteip.init("192.0.2.1, 127.0.0.0/8");
}
sub vcl_recv {
- set resp.http.x-real-ip = remoteip.get(resp.http.X-Forwarded-For);
+ set req.http.x-real-ip = remoteip.get(req.http.X-Forwarded-For);
...
}
COPYRIGHT
=========

Return to:

Send suggestions and report system problems to the System administrator.