From c437fb3ce7e2b6c1ffe4d22cadd7892e87a03dc0 Mon Sep 17 00:00:00 2001 From: Dave Hart Date: Wed, 29 Apr 2026 08:17:24 -0400 Subject: [PATCH] Fix interstitial never displaying when UserAgentPrefixes is configured --- endpoints/dynamicProxy/http.go | 2 +- endpoints/publicProxy/http.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/endpoints/dynamicProxy/http.go b/endpoints/dynamicProxy/http.go index b676459b..638c000f 100644 --- a/endpoints/dynamicProxy/http.go +++ b/endpoints/dynamicProxy/http.go @@ -253,6 +253,7 @@ func handleInterstitial(w http.ResponseWriter, r *http.Request, pcfg *config, cf sendInterstitial := true if len(pcfg.Interstitial.UserAgentPrefixes) > 0 { + sendInterstitial = false ua := r.Header.Get("User-Agent") for _, prefix := range pcfg.Interstitial.UserAgentPrefixes { if strings.HasPrefix(ua, prefix) { @@ -260,7 +261,6 @@ func handleInterstitial(w http.ResponseWriter, r *http.Request, pcfg *config, cf break } } - sendInterstitial = false } if sendInterstitial { diff --git a/endpoints/publicProxy/http.go b/endpoints/publicProxy/http.go index 1c70ea6c..9000fcd7 100644 --- a/endpoints/publicProxy/http.go +++ b/endpoints/publicProxy/http.go @@ -229,6 +229,7 @@ func handleInterstitial(w http.ResponseWriter, r *http.Request, pcfg *Config, cf sendInterstitial := true if len(pcfg.Interstitial.UserAgentPrefixes) > 0 { + sendInterstitial = false ua := r.Header.Get("User-Agent") for _, prefix := range pcfg.Interstitial.UserAgentPrefixes { if strings.HasPrefix(ua, prefix) { @@ -236,7 +237,6 @@ func handleInterstitial(w http.ResponseWriter, r *http.Request, pcfg *Config, cf break } } - sendInterstitial = false } if sendInterstitial {