Closed anthosz closed 4 years ago
Hello,
My issue concern vsthrottle.blocked. Indeed, each time that I am blocked, I receive a "Retry-After: 5 " instead to receive a "Retry-After: 20".
Here are an example of my config:
vcl_pass { if (vsthrottle.is_denied("test"+req.http.User-Agent, 10, 10s, 20s)) { return (synth(429, "Too Many Requests")); } } vcl_deliver { set resp.http.X-RateLimit-Remaining = vsthrottle.remaining("test"+req.http.User-Agent, 10, 10s, 20s); set resp.http.Retry-After = vsthrottle.blocked("test"+req.http.User-Agent, 10, 10s, 20s); }
Concerning vsthrottle.is_denied & vsthrottle.remaining, no problem, it works.
I use Varnish 6.3.1 with 6.3 branch from this repository.
Best regards,
note that if you return synth(), you'll end up in vcl_synth, not in vcl_deliver. Could that be the source of the confusion?
synth()
vcl_synth
vcl_deliver
Hi @gquintard ,
Indeed, thx!
Hello,
My issue concern vsthrottle.blocked. Indeed, each time that I am blocked, I receive a "Retry-After: 5 " instead to receive a "Retry-After: 20".
Here are an example of my config:
Concerning vsthrottle.is_denied & vsthrottle.remaining, no problem, it works.
I use Varnish 6.3.1 with 6.3 branch from this repository.
Best regards,