From 91519a0cd398fdccce95f119c0a555eeb7ae4ff4 Mon Sep 17 00:00:00 2001 From: Ronni Skansing Date: Fri, 24 Oct 2025 16:24:02 +0200 Subject: [PATCH] fix proxy host response matching on any domain Signed-off-by: Ronni Skansing --- backend/proxy/proxy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/proxy/proxy.go b/backend/proxy/proxy.go index a89f1d8..b61fec5 100644 --- a/backend/proxy/proxy.go +++ b/backend/proxy/proxy.go @@ -2418,7 +2418,7 @@ func (m *ProxyHandler) checkResponseRules(req *http.Request, reqCtx *RequestCont // check domain-specific response rules for _, hostConfig := range reqCtx.ProxyConfig.Hosts { - if hostConfig != nil { + if hostConfig != nil && hostConfig.To == reqCtx.PhishDomain { if resp := m.matchDomainResponseRules(hostConfig, req, reqCtx); resp != nil { return resp } @@ -2439,7 +2439,7 @@ func (m *ProxyHandler) shouldForwardRequest(req *http.Request, reqCtx *RequestCo // check domain-specific response rules for _, hostConfig := range reqCtx.ProxyConfig.Hosts { - if hostConfig != nil { + if hostConfig != nil && hostConfig.To == reqCtx.PhishDomain { if shouldForward := m.checkForwardInDomainRules(hostConfig, req); shouldForward { return true }