Showing
1 changed file
with
7 additions
and
2 deletions
@@ -68,8 +68,13 @@ end | @@ -68,8 +68,13 @@ end | ||
68 | local args=ngx.req.get_uri_args() | 68 | local args=ngx.req.get_uri_args() |
69 | local method=args["method"] | 69 | local method=args["method"] |
70 | if method == "list" then | 70 | if method == "list" then |
71 | - local u_name = args["upstream"] | ||
72 | - list(u_name) | 71 | + if not upstream then |
72 | + ngx.exit(400) | ||
73 | + ngx.log(ngx.ERR, "request params is error. upstream is null") | ||
74 | + else | ||
75 | + local u_name = args["upstream"] | ||
76 | + list(u_name) | ||
77 | + end | ||
73 | elseif(method=="down" or method=="up") then | 78 | elseif(method=="down" or method=="up") then |
74 | local upstream=args["upstream"] | 79 | local upstream=args["upstream"] |
75 | local backup=args["backup"]=="true" and true or false | 80 | local backup=args["backup"]=="true" and true or false |
-
Please register or login to post a comment