varnish 5 vmod for geoip country lookup

Admin Beckspaced admin at
Fri Oct 28 20:05:39 CEST 2016

hello varnish users,

is there a working, up-to-date, vmod for varnish 5 which gives me a 
country code based on the client ip address?

so i could do things like described in the docs:

In vcl_recv:

set req.http.X-Country-Code = geoip.lookup(client.ip);

And then add a vcl_hash:

sub vcl_hash {

alternatively, i think i could also let the backend send a http header 
X-country-code and then add this to the hash instead?

sub vcl_hash {

am I right on this?

greetings & thanks a lot for varnish!
the more i play with it the more i discover the power of it ;)

all the best

More information about the varnish-misc mailing list