mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-04-11 00:07:55 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user