Fix bug when auth req is enabled(external authentication) (#2280)
* set proxy_upstream_name correctly when auth_req module is used * log a more meaningful message when backend is not found
This commit is contained in:
parent
bcb162ac0f
commit
931e541fb7
3 changed files with 14 additions and 4 deletions
|
|
@ -27,7 +27,13 @@ end
|
|||
|
||||
local function get_current_backend()
|
||||
local backend_name = ngx.var.proxy_upstream_name
|
||||
return backends:get(backend_name)
|
||||
local backend = backends:get(backend_name)
|
||||
|
||||
if not backend then
|
||||
ngx.log(ngx.WARN, "no backend configuration found for " .. tostring(backend_name))
|
||||
end
|
||||
|
||||
return backend
|
||||
end
|
||||
|
||||
local function get_current_lb_alg()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue