Welcome! Log In Create A New Profile

Advanced

403 based on $request_body

Posted by jesin 
403 based on $request_body
February 13, 2013 10:27AM
I'm using nginx v1.2.6 along with php5-fpm on Debian. I would like to block POST requests containing a certain word so I have used the following config

server {
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
if ($request_body ~* word) {
return 403;
}
}
}

But i doesn't work at all.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 230
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready