how to set untrusted_lua_sandbox_requires env in docker-compose.yaml #14718
Unanswered
wangqinghuan
asked this question in
Help
Replies: 0 comments
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.
-
I need to decompress response_body using code like
Then got a response
2025/07/30 14:45:50 [error] 1410#0: *20687 failed to run body_filter_by_lua*: /usr/local/share/lua/5.1/kong/tools/kong-lua-sandbox.lua:164: [string "local utils = kong.tools.utils..."]:1: attempt to index field 'tools' (a nil value
By this document, we need to add kong.tools.utils to untrusted-lua-sandbox-requires.
Then I add KONG_UNTRUSTED_LUA_SANDBOX_REQUIRES environment in docker-compose.yaml.
Unfortunately, Kong still says
` [string "local utils = kong.tools.utils..."]:1: attempt to index field 'tools' (a nil value``
By passing environment in shell command also not work for me,
KONG_UNTRUSTED_LUA_SANDBOX_REQUIRES="kong.tools.utils" docker-compose --profile database up
How to make untrusted-lua-sandbox-requires effect?
Beta Was this translation helpful? Give feedback.
All reactions