From 9d666dc10870f101bb0653742419fadd72900c85 Mon Sep 17 00:00:00 2001 From: Stavros Date: Thu, 2 Apr 2026 18:24:26 +0300 Subject: [PATCH] fix: skip browser detection for nginx and envoy --- internal/controller/proxy_controller.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/controller/proxy_controller.go b/internal/controller/proxy_controller.go index fcb100e..a471216 100644 --- a/internal/controller/proxy_controller.go +++ b/internal/controller/proxy_controller.go @@ -323,11 +323,14 @@ func (controller *ProxyController) getHeader(c *gin.Context, header string) (str } func (controller *ProxyController) useBrowserResponse(proxyCtx ProxyContext) bool { - if !proxyCtx.IsBrowser { + // If it's nginx or envoy we need non-browser response + if proxyCtx.ProxyType == Nginx || proxyCtx.ProxyType == Envoy { return false } - if proxyCtx.ProxyType == Traefik { + // For other proxies (traefik or caddy) we can check + // the user agent to determine if it's a browser or not + if proxyCtx.IsBrowser { return true }