Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Symbol not found: 'req.request' (expected type BOOL): #9

Closed
blindpet opened this issue Oct 28, 2015 · 3 comments
Closed

Symbol not found: 'req.request' (expected type BOOL): #9

blindpet opened this issue Oct 28, 2015 · 3 comments

Comments

@blindpet
Copy link

Having trouble with a rule that worked in varnish 3 with throttle

Prevent users from making excessive POST requests that aren't for admin-ajax
if(((vsthrottle.is_denied(req.http.X-Actual-IP, 15, 10s) && (!req.url ~ "admin-ajax.php") &&     (req.request == "POST")) {
       return (synth(429, "Too Many Requests"));
       # Use shield vmod to reset connection
       shield.conn_reset();
}
@aondio
Copy link

aondio commented Oct 28, 2015

Hi,
req.request has become req.method in varnish 4.

@Francois-v3
Copy link

Hi,

req.request becames req.method in varnish 4.

François Veux.

Le 28/10/2015 21:05, blindpet a écrit :

Having trouble with a rule that worked in varnish 3 with throttle

|Prevent users from making excessive POST requests that aren't for
admin-ajax if(((vsthrottle.is_denied(req.http.X-Actual-IP, 15, 10s) &&
(!req.url ~ "admin-ajax.php") && (req.request == "POST")) { return
(synth(429, "Too Many Requests")); # Use shield vmod to reset
connection shield.conn_reset(); } |


Reply to this email directly or view it on GitHub
#9.

François Veux - +33633267508

@blindpet
Copy link
Author

Thank you very much for the support.

Made good use of this for protecting Wordpress, feel free to link to the walkthrough in Wiki. I will continue to tweak as necessary but this seems good for now.

@aondio aondio closed this as completed Oct 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants