Skip to content

Commit

Permalink
feat: add 438 error page
Browse files Browse the repository at this point in the history
  • Loading branch information
mhf-ir committed Jan 16, 2023
1 parent e4706af commit 91f5d6b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
6 changes: 6 additions & 0 deletions nginx/.defaults/error-pages/438.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<html>
<head><title>438 Intrusion Detected</title></head>
<body>
<center><h1>438 Intrusion Detected</h1></center>
</body>
</html>
1 change: 0 additions & 1 deletion nginx/.defaults/naxi/location.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ BasicRule wl:0 "mz:$HEADERS_VAR:sec-fetch-mode";
BasicRule wl:0 "mz:$HEADERS_VAR:sec-fetch-site";
BasicRule wl:0 "mz:$HEADERS_VAR:sec-fetch-user";

# TODO: add cookie protection
BasicRule wl:1002 "mz:$HEADERS_VAR:cookie"; # hex like caracters
BasicRule wl:1206 "mz:$HEADERS_VAR:cookie"; # base64 `/` character
16 changes: 16 additions & 0 deletions nginx/.defaults/naxi/server_debug.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set $naxsi_extensive_log 1;
set $naxsi_flag_enable 1;
set $naxsi_flag_learning $cookie_waf_learning;

location = /.well-known/438 {
set $naxsi_flag_enable 0;
auth_request off;
allow all;
return 438;
}

error_page 438 /438.html;
location = /438.html {
internal;
root /.defaults/error-pages;
}
6 changes: 6 additions & 0 deletions nginx/.defaults/naxi/server_enable.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ location = /.well-known/438 {
allow all;
return 438;
}

error_page 438 /438.html;
location = /438.html {
internal;
root /.defaults/error-pages;
}
6 changes: 6 additions & 0 deletions nginx/.defaults/naxi/server_learning.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ location = /.well-known/438 {
allow all;
return 438;
}

error_page 438 /438.html;
location = /438.html {
internal;
root /.defaults/error-pages;
}

0 comments on commit 91f5d6b

Please sign in to comment.