fix issue with failing e2e tests

This commit is contained in:
minherz 2019-02-01 22:11:09 +02:00
parent de2a1ece6d
commit 57440c9464

View file

@ -160,7 +160,7 @@ local function route_to_alternative_balancer(balancer)
local target_header = util.replace_special_char(traffic_shaping_policy.header, "-", "_")
local header = ngx.var["http_" .. target_header]
if header then
if traffic_shaping_policy.headerValue then
if traffic_shaping_policy.headerValue and #traffic_shaping_policy.headerValue > 0 then
if traffic_shaping_policy.headerValue == header then
return true
end