Hello,

I'm currently working on forcing cached results using vsthrottle vs
dropping requests, but for some reason (I probably did it wrong :) I can't
get var.get/var.set_duration to work. The vcl_recv snippet is as follows,
any input is greatly appreciated:

sub vcl_recv {
        if (vsthrottle.is_denied(req.http.Host, 500, 5s) ||
(var.get("block-" + req.http.Host))) {
                # The vsthrottle rate limit definitely triggers - confirmed
later with "Attack" header
                unset req.http.Cookie;
                unset req.http.User-Agent;
                unset req.http.Pragma;
                unset req.http.Cache-Control;
                set req.http.Attack = "ByHost: " + req.http.Host;
                set req.ttl = 15m;
                var.set_duration("block-" + req.http.Host,15m);
                return (hash);
        }
[..]
}
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to