Skip to content

Commit

Permalink
fix: limit_except returns 503 instead of the correct 403 (kubernetes#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ZJfans authored and strongjz committed Nov 13, 2024
1 parent 698960e commit 72ff20f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rootfs/etc/nginx/lua/balancer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72ff20f

Please sign in to comment.