You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/01/18 08:01:44 UTC
[GitHub] [apisix] OnlyPiglet opened a new issue #3324: bug: not type defination of stream_route.server_port in the file schema_def
OnlyPiglet opened a new issue #3324:
URL: https://github.com/apache/apisix/issues/3324
### Issue description
the type of stream_route.server_port is integer in the schema_def.lua
but the type of ngx.var.server_port or api_ctx.var.server_port is string.
so when I set the server_port of stream_route, it will matched failed because the string type and integer type is not equal.
```lua
_M.stream_route = {
type = "object",
properties = {
id = id_schema,
remote_addr = remote_addr_def,
server_addr = {
description = "server IP",
type = "string",
anyOf = ip_def,
},
server_port = {
description = "server port",
type = "integer",
},
upstream = upstream_schema,
upstream_id = id_schema,
plugins = plugins_schema,
}
}
```
```lua
```
### Environment
* apisix version (cmd: `apisix version`): lastest
* OS: (cmd: `uname -a`): centos 7.8
* OpenResty / Nginx version: (cmd: `nginx -V` or `openresty -V`)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] OnlyPiglet commented on issue #3324: bug: not type defination of stream_route.server_port in the file schema_def
Posted by GitBox <gi...@apache.org>.
OnlyPiglet commented on issue #3324:
URL: https://github.com/apache/apisix/issues/3324#issuecomment-762062188
sorry to dismissed the code of tonumber(vars.server_port)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] OnlyPiglet closed issue #3324: bug: not type defination of stream_route.server_port in the file schema_def
Posted by GitBox <gi...@apache.org>.
OnlyPiglet closed issue #3324:
URL: https://github.com/apache/apisix/issues/3324
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org