# Nginx WAF rules for LFI # Automatically generated from OWASP rules. # Include this file in your server or location block. map $request_uri $waf_block_lfi { default 0; "~*(?:(?:^|[x5c/;]).{2,3}[x5c/;]|[x5c/;].{2,3}(?:[x5c/;]|$))" 1; } if ($waf_block_lfi) { return 403; # Log the blocked request (optional) # access_log /var/log/nginx/waf_blocked.log; }