fix: skip browser detection for nginx and envoy

This commit is contained in:
Stavros
2026-04-02 18:24:26 +03:00
parent 7ad13935a5
commit 9d666dc108

View File

@@ -323,11 +323,14 @@ func (controller *ProxyController) getHeader(c *gin.Context, header string) (str
} }
func (controller *ProxyController) useBrowserResponse(proxyCtx ProxyContext) bool { 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 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 return true
} }