...
|
...
|
@@ -45,7 +45,7 @@ function do_degrade() |
|
|
|
|
|
if limit_ip_config and limit_ip_config.degrade_methods then
|
|
|
if contains(limit_ip_config.degrade_methods,method) then
|
|
|
ngx.log(ngx.ERR, "method is degraded.", method)
|
|
|
ngx.log(ngx.ERR, "[Degraded]: ", method)
|
|
|
ngx.header["Content-Type"]="application/json;charset=utf-8"
|
|
|
local rsp_body = '{"code":9999991,"message":"limited"}'
|
|
|
ngx.say(rsp_body)
|
...
|
...
|
|