request help: Profile extensions: Is it possible that allow users to add custom code to the Nginx initialization phase? #5029
griffenliu
started this conversation in
Ideas
Replies: 1 comment 13 replies
-
we can do this in plugin, see: apisix/apisix/plugins/example-plugin.lua Lines 62 to 68 in 22ee20c
I take a conservative view and I think this is risky. My options are as follows:
So I think this feature somewhat useless.
This is not a good way to do this, we can't write code in yaml. Even if we support i, it would be wrote in the plugin. @spacewander @tokers @membphis what's your options? |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue description
我有一些需求,比如在apisix启动时添加一些自定义的初始化逻辑,在apisix管理API的基础上添加一些自定义的管理API等等。想要在Nginx初始化或者Worker初始化阶段做一些事情。是否可以考虑通过配置允许在这两个阶段添加一些自定义代码?
比如:
配置中可以添加:
Environment
apisix version
):uname -a
):nginx -V
oropenresty -V
):curl http://127.0.0.1:9090/v1/server_info
to get the info from server-info API):luarocks --version
):Beta Was this translation helpful? Give feedback.
All reactions