help request: config.yaml中enable_admin属性和自定义插件_M_api()方法的关系 #6903
Unanswered
jade-sun-1111
asked this question in
Q&A
Replies: 2 comments
-
It's better to communicate with English in the public channel. Did translation, more community member will take some eyes and discuss on it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
yes, you need to change control-API, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
1.我需要在apisix自定义一个接口服务,所以自定义了一个插件,编写了_M_api()方法,可以访问成功
2.在config.yaml中把enbale_admin设置为false,但是自定义插件暴露出来的路由,仍然可以访问
我的问题:
1.自定义插件_M_api()方法暴露的接口 和 enbale_admin有没有关系? -- 已解决
2.自定义插件_M_api()方法暴露的接口的域名和端口能否自定义设置?
3.并且我发现自定义_M_api()方法暴露的接口不会执行全局插件, -- 已解决
====================================================================
取水用水,自问自答一部分问题:
1.enbale_admin只控制了 /apisix/admin/* 的路由,和自定义路由无关
2.自定义插件路由,会在init的http_access编排,根据插件的热加载版本,构造一个radixtree对象列表的lrucache,然后和当前uri匹配,同时执行handler回调。至此流程结束
3.至于自定义插件路由是否执行全局插件,由config.yaml中的 global_rule_skip_internal_api 属性控制
====================
遗留问题:
1.自定义插件路由的域名和端口能否自定义?
-- 根据radixtree的参数来看,有设置hosts和remote_addrs的属性,但是在apisix中还有待观察
Environment
apisix version
): 2.10.0uname -a
): Ubuntuopenresty -V
ornginx -V
): nginx version: openresty/1.19.3.1curl http://127.0.0.1:9090/v1/server_info
): "etcd_version":"3.4.0"luarocks --version
): luarocks 3.7.0Beta Was this translation helpful? Give feedback.
All reactions