Skip to content

Commit

Permalink
refactor(clustering): simplify parse_proxy_url() (#11799)
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw authored Oct 23, 2023
1 parent 53b1193 commit bab36ea
Showing 1 changed file with 3 additions and 3 deletions.
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

1 comment on commit bab36ea

@khcp-gha-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:bab36eadcc5adcd569fb61ddaff91eefa40a0cfc
Artifacts available https://github.com/Kong/kong/actions/runs/6611164197

Please sign in to comment.