Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ops
/
yoho-ansible-roles
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
chunhua.zhang
6 years ago
Commit
bb73c3a9298803e2866f299109b6ec14d8e28779
1 parent
7c0166af
more
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
roles/openresty/files/java-nginx-config/nginx/conf/lua/limit_api_flow.lua
roles/openresty/files/java-nginx-config/nginx/conf/lua/limit_api_flow.lua
View file @
bb73c3a
...
...
@@ -153,18 +153,31 @@ function main()
init_read_body
()
--cutdown version check
pcall
(
cutdown
)
local
status
,
errMsg
=
pcall
(
cutdown
)
if
not
status
then
ngx
.
log
(
ngx
.
ERR
,
"call method [cutdown] failed."
,
errMsg
)
end
-- check white ip
local
status
,
ret
=
pcall
(
is_white
);
if
status
and
ret
then
local
ret
=
false
status
,
errMsg
,
ret
=
pcall
(
is_white
);
if
not
status
then
ngx
.
log
(
ngx
.
ERR
,
"call method [is_white] failed."
,
errMsg
)
elseif
ret
then
return
end
-- check malIP and limit
pcall
(
check_malIp
)
pcall
(
rate_limit
)
status
,
errMsg
=
pcall
(
check_malIp
)
if
not
status
then
ngx
.
log
(
ngx
.
ERR
,
"call method [check_malIp] failed."
,
errMsg
)
end
status
,
errMsg
=
pcall
(
rate_limit
)
if
not
status
then
ngx
.
log
(
ngx
.
ERR
,
"call method [rate_limit] failed."
,
errMsg
)
end
end
----- running ----
...
...
Please
register
or
login
to post a comment