Skip to content

Commit

Permalink
fix(conf) fallback for lack of value for var placeholders
Browse files Browse the repository at this point in the history
`anonymous_reports=on` + `socket.toip` not resolving (ex: no internet
connection) would make Kong use an invalid Nginx template (with
variable placeholders untouched).
  • Loading branch information
thibaultcha committed Sep 8, 2016
1 parent 86b7fa9 commit bf0cbb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kong/cmd/utils/prefix_handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ local function compile_conf(kong_config, conf_template)
local post_template = pl_template.substitute(conf_template, compile_env)
return string.gsub(post_template, "(${%b{}})", function(w)
local name = w:sub(4, -3)
return compile_env[name:lower()]
return compile_env[name:lower()] or ""
end)
end

Expand Down

0 comments on commit bf0cbb4

Please sign in to comment.