On 9/17/09 1:17 PM, David Birdsong wrote:
I'm having trouble with the syntax of the hdr* matching for creating ACL's. I know that my control flow is correct. by changing the acl defiinition to a simple src ip, i get the desired change of backends. ie. this will send traffic to img backends (desired) # acl from_vnsh hdr_sub -i nginx acl from_vnsh src 208.94.1.44 use_backend varnish if METH_GET ! from_vnsh default_backend img this will send it to varnish: acl from_vnsh hdr_sub -i nginx # acl from_vnsh src 208.94.1.44 use_backend varnish if METH_GET ! from_vnsh default_backend img
I think the problem is you shouldn't have the METH_GET in there use_backend varnish if ! from_vnsh works for me
furthermore, is there a way to match on a header field and not the field's value? i have a field: X-Varnish: 751121622 i want to create the acl simply based on X-Varnish being present irrespective of the value of this field.
acl varn_present hdr_cnt(X-Varnish) gt 0