Showing
1 changed file
with
3 additions
and
0 deletions
@@ -14,6 +14,9 @@ function do_degrade() | @@ -14,6 +14,9 @@ function do_degrade() | ||
14 | for i, v in ipairs(degrade_methods) do | 14 | for i, v in ipairs(degrade_methods) do |
15 | if method == v then | 15 | if method == v then |
16 | ngx.log(ngx.ERR, "method is degraded.", method) | 16 | ngx.log(ngx.ERR, "method is degraded.", method) |
17 | + ngx.header["Content-Type"]="application/json;charset=utf-8" | ||
18 | + local rsp_body = '{"code":9999991,"message":"limited"}' | ||
19 | + ngx.say(rsp_body) | ||
17 | ngx.exit(ngx.HTTP_OK) | 20 | ngx.exit(ngx.HTTP_OK) |
18 | end | 21 | end |
19 | end | 22 | end |
-
Please register or login to post a comment