Custom TTLs
Andrei
lagged at gmail.com
Tue Jun 14 19:39:58 CEST 2016
Hi all,
Excuse my likely noobish mistakes - still getting used to it all. I'm using
vsthrottle in vcl_recv to force full cache hits instead of denying requests
for request bursts, however I'm having some trouble setting a custom ttl in
vcl_backend_response for those which trigger. Is there a way to perhaps set
a header/cookie or mark the packet/object in vcl_recv, then set a
different beresp.ttl if it exists? For example, I currently have this in
vcl_recv:
if (vsthrottle.is_denied(req.url, 50, 10s)) {
unset req.http.Cookie;
unset req.http.User-Agent;
unset req.http.Pragma;
unset req.http.Cache-Control;
set req.http.Attack = "triggered";
return (hash);
}
Is it possible to trigger an action in vcl_backend_response based on the
"Attack" header, or something similar? Any help is greatly appreciated!
Best Regards,
Andrei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20160614/388c2045/attachment.html>
More information about the varnish-misc
mailing list