Closed jiangfucheng closed 2 years ago
I want test apisix-go-plugin-runner whether can be used, it can be intercept by plugin when i used admin API create the Router, but it's not work when i create the Router by dashboard.
adminAPI request used apisix-go-plugin-runner docs example
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "uri": "/get", "plugins": { "ext-plugin-pre-req": { "conf": [ { "name": "say", "value":"{\"body\":\"hello\"}"} ] } }, "upstream": { "type": "roundrobin", "nodes": { "127.0.0.1:1980": 1 } } } '
The following is used for the configuration of the dashboard
{ "uri": "/*", "name": "nginx-test", "desc": "nginx-test", "methods": [ "GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE" ], "plugins": { "ext-plugin-pre-req": { "disable": true, "name": "say", "value": "{\"body\":\"hello\"}" } }, "upstream_id": "398094286752580298", "status": 1 }
upstream configuration
{ "nodes": [ { "host": "10.60.104.20", "port": 9081, "weight": 1 }, { "host": "10.60.104.20", "port": 9082, "weight": 1 } ], "timeout": { "connect": 6, "send": 6, "read": 6 }, "type": "roundrobin", "scheme": "http", "pass_host": "pass", "name": "nginx-test", "desc": "nginx-test", "keepalive_pool": { "idle_timeout": 60, "requests": 1000, "size": 320 } }
uname -a
I redeployed apisix by docker-compose, it's working.
Issue description
I want test apisix-go-plugin-runner whether can be used, it can be intercept by plugin when i used admin API create the Router, but it's not work when i create the Router by dashboard.
adminAPI request used apisix-go-plugin-runner docs example
The following is used for the configuration of the dashboard
upstream configuration
Environment
uname -a
): Linux f4b1f70a0825 5.10.47-linuxkit #1 SMP Sat Jul 3 21:51:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux (use docker-compose deployed)