>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 <[email protected]> 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
> [email protected]
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc