cuiWT opened a new issue #6083:
URL: https://github.com/apache/apisix/issues/6083
### Issue description
define my plugin, I do this
1、add feature-env-plugin.lua to /apisix/plugins
2、move plugin config from config-default.yaml to config.yaml, then add my
plugin config
3、reload plugins
`
# curl http://127.0.0.1:9080/apisix/admin/plugins/reload -H 'X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1' -X PUT
done
`
4、set a test route
`
# curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
> {
> "uri": "/smsSigns/list",
> "plugins": {
> "feature-env-plugin":{
> "service_name": "TEST-SERVER"
> }
> },
> "upstream": {
> "service_name":"TEST-SERVER",
> "type": "roundrobin",
> "discovery_type": "eureka"
> }
> }'
HTTP/1.1 400 Bad Request
Date: Wed, 12 Jan 2022 07:36:14 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Server: APISIX/2.11.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: *
Access-Control-Max-Age: 3600
{"error_msg":"unknown plugin [feature-env-plugin]"}
`
### Environment
- apisix version (cmd: `apisix version`): 2.11.0
- OS (cmd: `uname -a`): linux
- OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
- etcd version, if have (cmd: run `curl
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
- apisix-dashboard version, if have:
- the plugin runner version, if the issue is about a plugin runner (cmd:
depended on the kind of runner):
- luarocks version, if the issue is about installation (cmd: `luarocks
--version`):
--
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]