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 }