Answer the question
In order to leave comments, you need to log in
How to block post requests for url in nginx by mask?
Good afternoon. They bomb the site with simple ddos at different URLs like /cat/podcat/1562740
cat and podcat do not change, only the number changes
What should I write in the NGINX config to block only POST requests to these URLs?
Answer the question
In order to leave comments, you need to log in
Like so
location ~ /cat/podcat/\d+$ {
if ($request_method = "POST") {
deny all;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question