nic-6443 commented on code in PR #12714:
URL: https://github.com/apache/apisix/pull/12714#discussion_r2477210540
##########
apisix/upstream.lua:
##########
@@ -357,6 +363,11 @@ end
local function check_upstream_conf(in_dp, conf)
if not in_dp then
+ for _, node in ipairs(conf.nodes or {}) do
+ if core.utils.parse_ipv6(node.host) and str_byte(node.host, 1) ~=
str_byte("[") then
+ return false, "IPv6 address must be enclosed with '[' and ']'"
+ end
+ end
local ok, err = core.schema.check(core.schema.upstream, conf)
Review Comment:
```suggestion
local ok, err = check_schema(conf)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]