<div dir="ltr">From one of my production servers:<div><br></div><div>import std;<br></div><div><br></div><div>sub vcl_deliver {<br></div><div>if (std.ip(req.http.RIP,"0.0.0.0") ~ hitpass) {<br></div><div>....</div><div>}</div><div>}</div><div><br></div><div>"RIP" is the client ip value in header.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 31, 2017 at 1:05 PM, Dridi Boukelmoune <span dir="ltr"><<a href="mailto:dridi@varni.sh" target="_blank">dridi@varni.sh</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> Is there any way I can get the same result as this but without using<br>
> client.ip?<br>
<br>
Yes: std.ip(string, ip_fallback)<br>
<br>
    if (std.ip(req.http.X-Real-Ip, "some_address") ~ trustedips) {<br>
<br>
See man vmod_std, or search the online docs.<br>
<br>
Dridi<br>
<br>
______________________________<wbr>_________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/<wbr>lists/mailman/listinfo/<wbr>varnish-misc</a><br>
</blockquote></div><br></div>