Permalink
Browse files

slight change to README

  • Loading branch information...
1 parent b99186e commit 2348617e0c280813833817a275814e71ea0ef6aa Lee committed Jun 22, 2011
Showing with 11 additions and 9 deletions.
  1. +11 −9 README
View
20 README
@@ -6,19 +6,21 @@ compile your vmod. Both the VARNISHSRC and VARNISHSRC/include
will be added to the include search paths for your module.
Make targets:
-make - builds the vmod
-make install - installs your vmod in VMODDIR
-make check - runs the unit tests in src/tests/*.vtc
+ make - builds the vmod
+ make install - installs your vmod in VMODDIR
+ make check - runs the unit tests in src/tests/*.vtc
In your VCL you could then use this vmod like the following. This
sets the request header X-GeoIP to the requestor's geo (or Unknown).
+ ,----
+ | import geoip;
+ |
+ | sub vcl_recv {
+ | set req.http.X-Forwarded-For = client.ip;
+ | set req.http.X-GeoIP = geoip.country(req.http.X-Forwarded-For)
+ | }
+ `----
-import geoip;
-
-sub vcl_recv {
- set req.http.X-Forwarded-For = client.ip;
- set req.http.X-GeoIP = geoip.country(req.http.X-Forwarded-For)
-}
CREDITS:

0 comments on commit 2348617

Please sign in to comment.