Hi, What do you mean by "work"? What's the expected result, and what is the actual result?
-- Guillaume Quintard On Wed, Jun 29, 2016 at 8:17 AM, Andrei <[email protected]> wrote: > 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 >
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
