Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: create route with error format remote_addrs manager-api will return 200, but should return 400 #873

Closed
idbeta opened this issue Nov 25, 2020 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@idbeta
Copy link
Contributor

idbeta commented Nov 25, 2020

Bug report

Describe the bug

manager-api shuold not allow create route with error format remote_addrs

How to Reproduce

{
			caseDesc: "config route with invalid remote_addrs",
			Object:   MangerApiExpect(t),
			Method:   http.MethodPut,
			Path:     "/apisix/admin/routes/r1",
			Body: `{
					"uri": "/test_uri",
					"remote_addrs": "127.0.0.1",
					"upstream": {
						"type": "roundrobin",
						"nodes": {
							"172.16.238.20:1980": 1
						}
					}
				}`,
			Headers:      map[string]string{"Authorization": token},
			ExpectStatus: http.StatusBadRequest,
},

It is return 200 now.

@idbeta idbeta added the bug Something isn't working label Nov 25, 2020
@idbeta idbeta changed the title bug: manager-api shuold not allow create route with error format remote_addrs bug: create route with error format remote_addrs manager-api return 200, should be 400 Nov 25, 2020
@idbeta idbeta changed the title bug: create route with error format remote_addrs manager-api return 200, should be 400 bug: create route with error format remote_addrs manager-api will return 200, but should be 400 Nov 25, 2020
@idbeta idbeta changed the title bug: create route with error format remote_addrs manager-api will return 200, but should be 400 bug: create route with error format remote_addrs manager-api will return 200, but should return 400 Nov 25, 2020
@membphis membphis added this to the 2.1.1 milestone Nov 26, 2020
@nic-chen
Copy link
Member

close by #899

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants