On Tue, Apr 14, 2015 at 8:48 PM, Bertrand Caplet <[email protected]
> wrote:

> Hey guys,
> I set varnish behind a nginX proxy few days ago.
> I want to be able to purge varnish only from the machine where it's
> hosted but because there is a nginx reverse proxy in front of it,
> varnish thinks it's coming from 127.0.0.1 so basically whatever the
> client is, anyone can purge the cache.
> By the way I set some rules for varnish to know x-forwarded-for =
> client.ip.


> Do you know how can I change that?
>

See man vmod_std, look for the function "ip". It allows you to cast a
string in a ip address to match it against a acl.

Oh. There an online version;
https://www.varnish-cache.org/docs/4.0/reference/vmod_std.generated.html#ip-ip-string-ip


-- 
*Per Buer*
CTO | Varnish Software AS
Cell: +47 95839117
We Make Websites Fly!
www.varnish-software.com
[image: Register now]
<http://info.varnish-software.com/varnish-summits-autumn-2014-registration>
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to