apache / apisix-go-plugin-runner

Go Plugin Runner for APISIX
https://apisix.apache.org/
Apache License 2.0
167 stars 69 forks source link

request help: 有多个插件需要同时启动,应该怎么配置 #99

Closed xth530 closed 1 year ago

xth530 commented 1 year ago

Issue description

我有多个插件需要同时注册,配置文件应该怎么定义

Environment

像这样 ext-plugin: cmd: ["/path/to/apisix-go-plugin-runner/go-runner", "run"] cmd: ["/path/to/apisix-go-plugin-runner/go-runner2", "run"]

wangfeng22 commented 1 year ago

Issue description

我有多个插件需要同时注册,配置文件应该怎么定义

Environment

像这样 ext-plugin: cmd: ["/path/to/apisix-go-plugin-runner/go-runner", "run"] cmd: ["/path/to/apisix-go-plugin-runner/go-runner2", "run"]

推荐应该在plugin里配置,比如

 "plugins": {
    "ext-plugin-post-req": {
      "conf": [
        {
          "name": "response-rewrite",
          "value": "{\"status\":200,\"headers\":{\"a\":\"c\"},\"body\":\"aaa\"}"
        },
        {
          "name": "say",
          "value": "{\"body\":\"aaa\"}"
        }
      ],
      "disable": false
    }
  }