Skip to content

Commit 839e628

Browse files
feat: 修改 waf 告警页面样式 (#80)
1 parent 11409fc commit 839e628

File tree

3 files changed

+137
-31
lines changed

3 files changed

+137
-31
lines changed

apps/openresty/versions/1.21.4.1/www/common/waf/access.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ local function read_str(var)
7979
return str
8080
end
8181

82-
local html=read_str('html')
82+
local html=read_str('warn.html')
8383

8484
local function say_html()
8585
local redirect = optionIsOn(ngx.var.redirect)

apps/openresty/versions/1.21.4.1/www/common/waf/rules/html

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
<html xmlns="http://www.w3.org/1999/xhtml">
2+
<head>
3+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4+
<title>网站防火墙</title>
5+
<style>
6+
p {
7+
line-height: 20px;
8+
}
9+
ul {
10+
list-style-type: none;
11+
}
12+
li {
13+
list-style-type: none;
14+
}
15+
</style>
16+
</head>
17+
18+
<body style="padding: 0; margin: 0; font: 14px/1.5 Microsoft Yahei, 宋体, sans-serif; color: #555">
19+
<div style="margin: 0 auto; width: 1000px; padding-top: 200px; overflow: hidden">
20+
<div style="width: 600px; margin: 0 auto;">
21+
<div
22+
style="
23+
height: 40px;
24+
line-height: 40px;
25+
color: #fff;
26+
font-size: 16px;
27+
overflow: hidden;
28+
background: #6bb3f6;
29+
padding-left: 20px;
30+
"
31+
>
32+
网站防火墙
33+
</div>
34+
<div
35+
style="
36+
border: 1px dashed #cdcece;
37+
border-top: none;
38+
font-size: 14px;
39+
background: #fff;
40+
color: #555;
41+
line-height: 24px;
42+
height: 220px;
43+
padding: 20px 20px 0 20px;
44+
overflow-y: auto;
45+
background: #f3f7f9;
46+
"
47+
>
48+
<p
49+
style="
50+
margin-top: 0px;
51+
margin-bottom: 0px;
52+
margin-left: 0px;
53+
margin-right: 0px;
54+
-qt-block-indent: 0;
55+
text-indent: 0px;
56+
"
57+
>
58+
<span style="font-weight: 600; color: #fc4f03">
59+
您的请求带有不合法参数,已被网站管理员设置拦截!
60+
</span>
61+
</p>
62+
<p
63+
style="
64+
margin-top: 0px;
65+
margin-bottom: 0px;
66+
margin-left: 0px;
67+
margin-right: 0px;
68+
-qt-block-indent: 0;
69+
text-indent: 0px;
70+
"
71+
>
72+
可能原因:您提交的内容包含危险的攻击请求
73+
</p>
74+
<p
75+
style="
76+
margin-top: 12px;
77+
margin-bottom: 12px;
78+
margin-left: 0px;
79+
margin-right: 0px;
80+
-qt-block-indent: 1;
81+
text-indent: 0px;
82+
"
83+
>
84+
如何解决:
85+
</p>
86+
<ul
87+
style="
88+
margin-top: 0px;
89+
margin-bottom: 0px;
90+
margin-left: 0px;
91+
margin-right: 0px;
92+
-qt-list-indent: 1;
93+
"
94+
>
95+
<li
96+
style="
97+
margin-top: 12px;
98+
margin-bottom: 0px;
99+
margin-left: 0px;
100+
margin-right: 0px;
101+
-qt-block-indent: 0;
102+
text-indent: 0px;
103+
"
104+
>
105+
1)检查提交内容;
106+
</li>
107+
<li
108+
style="
109+
margin-top: 0px;
110+
margin-bottom: 0px;
111+
margin-left: 0px;
112+
margin-right: 0px;
113+
-qt-block-indent: 0;
114+
text-indent: 0px;
115+
"
116+
>
117+
2)如网站托管,请联系空间提供商;
118+
</li>
119+
<li
120+
style="
121+
margin-top: 0px;
122+
margin-bottom: 0px;
123+
margin-left: 0px;
124+
margin-right: 0px;
125+
-qt-block-indent: 0;
126+
text-indent: 0px;
127+
"
128+
>
129+
3)普通网站访客,请联系网站管理员;
130+
</li>
131+
</ul>
132+
</div>
133+
</div>
134+
</div>
135+
</body>
136+
</html>

0 commit comments

Comments
 (0)