mirror of
https://github.com/fabriziosalmi/patterns.git
synced 2025-12-17 17:55:48 +00:00
21 lines
499 B
Plaintext
21 lines
499 B
Plaintext
# Nginx WAF rules for INITIALIZATION
|
|
# Automatically generated from OWASP rules.
|
|
# Include this file in your server or location block.
|
|
|
|
map $request_uri $waf_block_initialization {
|
|
default 0;
|
|
"~*@eq 0" 1;
|
|
"~*^.*$" 1;
|
|
"~*@eq 100" 1;
|
|
"~*@eq 1" 1;
|
|
"~*!@rx (?:URLENCODED|MULTIPART|XML|JSON)" 1;
|
|
"~*^[a-f]*([0-9])[a-f]*([0-9])" 1;
|
|
}
|
|
|
|
if ($waf_block_initialization) {
|
|
return 403;
|
|
# Log the blocked request (optional)
|
|
# access_log /var/log/nginx/waf_blocked.log;
|
|
}
|
|
|