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 committed Aug 24, 2024
1 parent 5243b9b commit 2a71a24
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 2a71a24

Please sign in to comment.