fix: return 307 redirects for envoy proxy instead of 401 (#782)

* fix: return 307 redirects for envoy proxy instead of 401

* tests: extend testing for non browser detection in all proxies
This commit is contained in:
Stavros
2026-04-10 18:11:10 +03:00
committed by GitHub
parent d25aaba9d1
commit b44dc75f54
2 changed files with 42 additions and 42 deletions

View File

@@ -323,12 +323,12 @@ func (controller *ProxyController) getHeader(c *gin.Context, header string) (str
}
func (controller *ProxyController) useBrowserResponse(proxyCtx ProxyContext) bool {
// If it's nginx or envoy we need non-browser response
if proxyCtx.ProxyType == Nginx || proxyCtx.ProxyType == Envoy {
// If it's nginx we need non-browser response
if proxyCtx.ProxyType == Nginx {
return false
}
// For other proxies (traefik or caddy) we can check
// For other proxies (traefik/caddy/envoy) we can check
// the user agent to determine if it's a browser or not
if proxyCtx.IsBrowser {
return true