Skip to content

Commit

Permalink
fix: vault usage
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dmehala committed Jun 20, 2024
1 parent 34f730a commit b611faf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kong/plugins/ddtrace/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ local function configure(conf)
local get_from_vault = kong.vault.get
local get_env = function(env_name)
local env_value, _ = get_from_vault(string.format("{vault://env/%s}", env_name))
if env_value and #env_value == 0 then
return nil
end
return env_value
end

Expand Down

0 comments on commit b611faf

Please sign in to comment.