mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-04-03 04:17:58 +00:00
fix: skip browser detection for nginx and envoy
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user