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
eefa1ae2ee44bb68d8817c6bebc73c851539fdf1
1 parent
7ed5e173
add
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 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 @
eefa1ae
...
...
@@ -125,6 +125,23 @@ function check_malIp()
end
---------end check_malIp()-----------
---- function stop cutdown version
function
cutdown
()
local
method
=
http_request
.
get_method
()
local
app_version
=
http_request
.
get_http_req_param
(
"app_version"
)
if
method
and
(
method
==
"app.cutdownprice.cut"
and
app_version
<
"2.9.5"
)
then
ngx
.
log
(
ngx
.
ERR
,
"[NOT ALLOWED]"
)
local
rsp
=
'{"code": 10000, "message": "请升级小程序"}'
ngx
.
say
(
rsp
)
ngx
.
exit
(
ngx
.
HTTP_OK
)
return
end
end
---- function read request body
function
init_read_body
()
if
ngx
.
var
.
request_method
==
"POST"
and
ngx
.
var
.
content_type
and
string.match
(
ngx
.
var
.
content_type
,
"application/x%-www%-form%-urlencoded.*"
)
then
...
...
Please
register
or
login
to post a comment