Using ACL with non-IP fields

Hazar Güney hazarguney at gmail.com
Fri Mar 31 13:58:48 CEST 2017


>From one of my production servers:

import std;

sub vcl_deliver {
if (std.ip(req.http.RIP,"0.0.0.0") ~ hitpass) {
....
}
}

"RIP" is the client ip value in header.

On Fri, Mar 31, 2017 at 1:05 PM, Dridi Boukelmoune <dridi at varni.sh> wrote:

> > Is there any way I can get the same result as this but without using
> > client.ip?
>
> Yes: std.ip(string, ip_fallback)
>
>     if (std.ip(req.http.X-Real-Ip, "some_address") ~ trustedips) {
>
> See man vmod_std, or search the online docs.
>
> Dridi
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20170331/65d7a8c9/attachment.html>


More information about the varnish-misc mailing list