You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2024/05/24 02:14:01 [error] 49#49: *543808 lua entry thread aborted: runtime error: /usr/local/openresty/lualib/resty/core/request.lua:118: bad argument #1 to 'lower' (string expected, got nil)
stack traceback:
coroutine 0:
[C]: in function 'lower'
Expected Behavior
No response
Error Logs
2024/05/24 02:14:01 [error] 49#49: *543808 lua entry thread aborted: runtime error: /usr/local/openresty/lualib/resty/core/request.lua:118: bad argument #1 to 'lower' (string expected, got nil)
stack traceback:
coroutine 0:
[C]: in function 'lower'
/usr/local/openresty/lualib/resty/core/request.lua:118: in function '__index'
/usr/local/apisix/apisix/core/request.lua:110: in function 'header'
/usr/local/apisix/apisix/plugins/key-auth.lua:71: in function 'phase_fun'
[string "route#514932448631456457"]:17: in function 'phase_func'
/usr/local/apisix/apisix/script.lua:52: in function 'run'
/usr/local/apisix/apisix/init.lua:690: in function 'http_access_phase'
access_by_lua(nginx.conf:317):2: in main chunk, client: 172.23.0.1, server: _, request: "GET /headers HTTP/1.1"
Hello @wensenz, also happened to me, it seems related to the plugin configuration.
To solve you need to pass the optional property header, on the plugin config, like this:
Current Behavior
2024/05/24 02:14:01 [error] 49#49: *543808 lua entry thread aborted: runtime error: /usr/local/openresty/lualib/resty/core/request.lua:118: bad argument #1 to 'lower' (string expected, got nil)
stack traceback:
coroutine 0:
[C]: in function 'lower'
Expected Behavior
No response
Error Logs
2024/05/24 02:14:01 [error] 49#49: *543808 lua entry thread aborted: runtime error: /usr/local/openresty/lualib/resty/core/request.lua:118: bad argument #1 to 'lower' (string expected, got nil)
stack traceback:
coroutine 0:
[C]: in function 'lower'
/usr/local/openresty/lualib/resty/core/request.lua:118: in function '__index'
/usr/local/apisix/apisix/core/request.lua:110: in function 'header'
/usr/local/apisix/apisix/plugins/key-auth.lua:71: in function 'phase_fun'
[string "route#514932448631456457"]:17: in function 'phase_func'
/usr/local/apisix/apisix/script.lua:52: in function 'run'
/usr/local/apisix/apisix/init.lua:690: in function 'http_access_phase'
access_by_lua(nginx.conf:317):2: in main chunk, client: 172.23.0.1, server: _, request: "GET /headers HTTP/1.1"
Steps to Reproduce
use APISIX Dashboard config
consumers :
routes:
got-json:
Environment
i use docker-compose:
apisix version
): 3.9.0uname -a
):openresty -V
ornginx -V
):curl http://127.0.0.1:9090/v1/server_info
):luarocks --version
):The text was updated successfully, but these errors were encountered: