Skip to content

Commit 9d666dc

Browse files
committed
fix: skip browser detection for nginx and envoy
1 parent 7ad1393 commit 9d666dc

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

internal/controller/proxy_controller.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,11 +323,14 @@ func (controller *ProxyController) getHeader(c *gin.Context, header string) (str
323323
}
324324

325325
func (controller *ProxyController) useBrowserResponse(proxyCtx ProxyContext) bool {
326-
if !proxyCtx.IsBrowser {
326+
// If it's nginx or envoy we need non-browser response
327+
if proxyCtx.ProxyType == Nginx || proxyCtx.ProxyType == Envoy {
327328
return false
328329
}
329330

330-
if proxyCtx.ProxyType == Traefik {
331+
// For other proxies (traefik or caddy) we can check
332+
// the user agent to determine if it's a browser or not
333+
if proxyCtx.IsBrowser {
331334
return true
332335
}
333336

0 commit comments

Comments
 (0)