diff --git a/kong/clustering/utils.lua b/kong/clustering/utils.lua index 891aa974c69..72e1cca30c5 100644 --- a/kong/clustering/utils.lua +++ b/kong/clustering/utils.lua @@ -30,9 +30,9 @@ local CLUSTER_PROXY_SSL_TERMINATOR_SOCK = fmt("unix:%s/cluster_proxy_ssl_termina local _M = {} -local function parse_proxy_url(conf) +local function parse_proxy_url(proxy_server) local ret = {} - local proxy_server = conf.proxy_server + if proxy_server then -- assume proxy_server is validated in conf_loader local parsed = parse_url(proxy_server) @@ -81,7 +81,7 @@ function _M.connect_cp(dp, endpoint, protocols) } if conf.cluster_use_proxy then - local proxy_opts = parse_proxy_url(conf) + local proxy_opts = parse_proxy_url(conf.proxy_server) opts.proxy_opts = { wss_proxy = proxy_opts.proxy_url, wss_proxy_authorization = proxy_opts.proxy_authorization,