-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: strictly validate the input of core resources #10233
feat: strictly validate the input of core resources #10233
Conversation
Signed-off-by: Sn0rt <[email protected]>
"uri": "/hello", | ||
"upstream": { | ||
"type": "roundrobin", | ||
"nodes": { | ||
"127.0.0.1:1980": 1 | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field is not as expected and is not allowed to be passed into upstream in the global-rule.
_M.global_rule = {
type = "object",
properties = {
id = id_schema,
plugins = plugins_schema,
create_time = timestamp_def,
update_time = timestamp_def
},
required = {"id", "plugins"},
additionalProperties = false,
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you delete this block, the test case will fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have test this PR on myself repo https://github.com/Sn0rt/apisix/pull/9
Description
Fixes #10229
Checklist