From 42c02b0ff249e8bfec9b7e51ada92d96491de3f5 Mon Sep 17 00:00:00 2001 From: chronolaw Date: Sat, 13 Jan 2024 08:03:25 +0800 Subject: [PATCH] change helpers.lua --- spec/helpers.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/helpers.lua b/spec/helpers.lua index 102b2ce45e1d..b178b7fce7ad 100644 --- a/spec/helpers.lua +++ b/spec/helpers.lua @@ -885,7 +885,7 @@ end local function get_proxy_port(ssl, http2) if ssl == nil then ssl = false end for _, entry in ipairs(conf.proxy_listeners) do - if entry.ssl == ssl and (http2 == nil or entry.http2 == http2) then + if entry.ssl == ssl then return entry.port end end @@ -900,7 +900,7 @@ end local function get_proxy_ip(ssl, http2) if ssl == nil then ssl = false end for _, entry in ipairs(conf.proxy_listeners) do - if entry.ssl == ssl and (http2 == nil or entry.http2 == http2) then + if entry.ssl == ssl then return entry.ip end end