spacewander commented on issue #2602:
URL: https://github.com/apache/apisix/issues/2602#issuecomment-720820306
I tried the second example and got an error:
> 2020/11/03 09:09:45 [error] 1869#1869: *2 [lua] config_yaml.lua:195:
failed to check item data of [routes] err:property "plugins" validation failed:
wrong type: expected object, got table ,val:
{"plugins":[{"redirect":{"uri":"\/api\/${everything}"}}],"uri":"\/hello\/${everything}","upstream":{"nodes":{"127.0.0.1:8080":1},"type":"roundrobin"}},
context: ngx.timer
The `plugin` field is an object, not an array, for example:
```
"plugins": { # not [
"limit-count": {
"count": 2,
"time_window": 60,
"rejected_code": 503,
"key": "remote_addr"
},
"prometheus": {}
}
```
See
https://github.com/apache/apisix/blob/master/doc/zh-cn/architecture-design.md#plugin
----------------------------------------------------------------
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:
[email protected]