Skip to content

Commit b611faf

Browse files
committed
fix: vault usage
Since Kong 3.7 call to vault can returns an empty string when the env variable do not exist. This commit handle correctly this new case.
1 parent 34f730a commit b611faf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kong/plugins/ddtrace/handler.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ local function configure(conf)
192192
local get_from_vault = kong.vault.get
193193
local get_env = function(env_name)
194194
local env_value, _ = get_from_vault(string.format("{vault://env/%s}", env_name))
195+
if env_value and #env_value == 0 then
196+
return nil
197+
end
195198
return env_value
196199
end
197200

0 commit comments

Comments
 (0)