Using multiple scenarios inside a conditional VCL statement

Dridi Boukelmoune dridi at varni.sh
Mon May 4 11:56:22 CEST 2015


Hi Andrew,

The syntax would be a bit more verbose:

if (client.ip ~ acl1 || client.ip ~ acl2 || client.ip ~ acl3 ) {
    ...
}

Cheers,
Dridi

On Sun, May 3, 2015 at 1:10 AM, Andrew Langhorn
<andrew.langhorn at digital.cabinet-office.gov.uk> wrote:
> Hi,
>
> When doing a comparison inside a conditional statement, what is the accepted
> way to provide multiple scenarios to test against inside the conditional?
>
> For instance, if I set up multiple ACLs, and then check client.ip against
> them using the following syntax, is it likely to work?
>
> if (client.ip ~ acl1 || acl2 || acl3 ) {
>  ...
> }
>
> If not, does anyone know what will work?
>
> Thanks,
>
> Andrew Langhorn
> Web Operations
> Government Digital Service
>
> e: andrew.langhorn at digital.cabinet-office.gov.uk
> a: 6th Floor, Aviation House, 125 Kingsway, London, WC2B 6NH
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc



More information about the varnish-misc mailing list