# Nginx WAF rules for PHP # Automatically generated from OWASP rules. # Include this file in your server or location block. map $request_uri $waf_block_php { default 0; "~*.*.ph(?:pd*|tml|ar|ps|t|pt).*$" 1; "~*[oOcC]:d+:\".+?\":d+:{.*}" 1; "~*(?:b(?:f(?:tp_(?:nb_)?f?(?:ge|pu)t|get(?:s?s|c)|scanf|write|open|read)|gz(?:(?:encod|writ)e|compress|open|read)|s(?:ession_start|candir)|read(?:(?:gz)?file|dir)|move_uploaded_file|(?:proc_|bz)open|call_user_func)|$_(?:(?:pos|ge)t|session))b" 1; "~*.*.(?:phpd*|phtml)..*$" 1; "~*@pm =" 1; "~*@pm ?>" 1; "~*(?i)