...
|
...
|
@@ -14,6 +14,9 @@ function do_degrade() |
|
|
for i, v in ipairs(degrade_methods) do
|
|
|
if method == v then
|
|
|
ngx.log(ngx.ERR, "method is degraded.", method)
|
|
|
ngx.header["Content-Type"]="application/json;charset=utf-8"
|
|
|
local rsp_body = '{"code":9999991,"message":"limited"}'
|
|
|
ngx.say(rsp_body)
|
|
|
ngx.exit(ngx.HTTP_OK)
|
|
|
end
|
|
|
end
|
...
|
...
|
|