fix: limit_except returns 503 instead of the correct 403 (#11742)
This commit is contained in:
parent
698960e9b7
commit
72ff20ff47
1 changed files with 5 additions and 0 deletions
|
@ -277,6 +277,11 @@ local function get_balancer()
|
|||
|
||||
local backend_name = ngx.var.proxy_upstream_name
|
||||
|
||||
if backend_name == '-' then
|
||||
ngx.status = ngx.HTTP_FORBIDDEN
|
||||
return ngx.exit(ngx.status)
|
||||
end
|
||||
|
||||
local balancer = balancers[backend_name]
|
||||
if not balancer then
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue