chilcano commented on issue #9928: URL: https://github.com/apache/apisix/issues/9928#issuecomment-1662182931
Thanks @shreemaan-abhishek for sharing this information. Definitely, I'm missing out something in my code. __Questions:__ __1. What libraries are available in each phase?.__ I changed the plugin phase from `_M.access()` to `_M.header_filter()` and now I'm having this error when the plugin is being executed. ```sh .. 2023/08/02 11:21:15 [error] 51#51: *4647263 failed to run header_filter_by_lua*: /usr/local/apisix/apisix/patch.lua:372: API disabled in the context of header_filter_by_lua* stack traceback: [C]: in function 'error' /usr/local/openresty/lualib/resty/core/socket/tcp.lua:271: in function 'original_tcp' /usr/local/apisix/apisix/patch.lua:372: in function 'ngx_socket_tcp' /usr/local/apisix//deps/share/lua/5.1/resty/http.lua:133: in function 'new' /opt/apisix/plugins/api2-plugin.lua:41: in function 'make_request_to_url' /opt/apisix/plugins/api2-plugin.lua:123: in function 'phase_func' /usr/local/apisix/apisix/plugin.lua:1134: in function 'common_phase' /usr/local/apisix/apisix/init.lua:760: in function 'http_header_filter_phase' header_filter_by_lua:2: in main chunk, client: 172.19.0.1, server: _, request: "GET /mychainedapi/hello HTTP/1.1", host: "127.0.0.1:9080" ... ``` This means there are not libraries available in that phase. If so, what libraries can be used there? __2. If only some libraries are accessible in each phase, how I can chain the execution of 2 plugins where the response of the 1st plugin is available in the 2nd plugin__ Each plugin (api1-plugin and api2-plugin) call external Endpoint URL Any idea is welcome. Regards. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org