Skip to content

Commit b65263c

Browse files
committed
tuned balancer.lua
1 parent 27b40cd commit b65263c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rootfs/etc/nginx/lua/balancer.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ local function get_alternative_or_original_balancer(balancer)
253253
elseif err then
254254
ngx.log(ngx.ERR, "error when matching canary-by-header-pattern: '",
255255
traffic_shaping_policy.headerPattern, "', error: ", err)
256+
-- if headerPattern is broken, we remove this alternative_backend from further processing
257+
table.insert(never_id_list, i)
256258
end
257259
-- If header was specified, but headerValue or headerPattern was not, check the value of header by "always"/"never"
258260
elseif header == "always" then

0 commit comments

Comments
 (0)