Feature REQ: Match header value against acl

Henry Paulissen h.paulissen at qbell.nl
Tue Jan 19 16:04:14 CET 2010


I noticed it is impossible to match a header value against a acl.

 

What I tried to do is as follow:

if ( !req.http.X-Forwarded-For ~ purge ) {

remove req.http.Cache-Control;

}

 

This is to reduce the number of forced refreshes due to bots.

And normally you would use client.ip (what works with acl's), but I have a
load balancer in front of varnish. So all client ip addresses are in the
X-Forwarded-For header.

 

A dirty quick fix for now is to use regex, but this gives a lot of extra
code (as I have to match against serval ip's).

 

Current version: varnish-trunk SVN 4444

 

 

Regards,

Henry

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100119/485d7b3b/attachment-0001.html>


More information about the varnish-misc mailing list