Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(clustering): simplify parse_proxy_url() #11799

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions kong/clustering/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down