diff --git a/images/router/haproxy/conf/haproxy-config.template b/images/router/haproxy/conf/haproxy-config.template index 797db3226..0cf5f1308 100644 --- a/images/router/haproxy/conf/haproxy-config.template +++ b/images/router/haproxy/conf/haproxy-config.template @@ -163,9 +163,6 @@ defaults timeout http-request {{ firstMatch $timeSpecPattern (env "ROUTER_SLOWLORIS_TIMEOUT") "10s" }} timeout http-keep-alive {{ firstMatch $timeSpecPattern (env "ROUTER_SLOWLORIS_HTTP_KEEPALIVE") "300s" }} - # Long timeout for WebSocket connections. - timeout tunnel {{ firstMatch $timeSpecPattern (env "ROUTER_DEFAULT_TUNNEL_TIMEOUT") "1h" }} - {{- if isTrue (env "ROUTER_ENABLE_COMPRESSION") }} compression algo gzip compression type {{ env "ROUTER_COMPRESSION_MIME" "text/html text/plain text/css" }} @@ -586,6 +583,8 @@ backend {{ genBackendNamePrefix $cfg.TLSTermination }}:{{ $cfgIdx }} {{- end }} {{- with $value := clipHAProxyTimeoutValue (firstMatch $timeSpecPattern (index $cfg.Annotations "haproxy.router.openshift.io/timeout-tunnel")) }} timeout tunnel {{ $value }} + {{- else }} + timeout tunnel {{ firstMatch $timeSpecPattern (env "ROUTER_DEFAULT_TUNNEL_TIMEOUT") "1h" }} {{- end }} {{- if isTrue (index $cfg.Annotations "haproxy.router.openshift.io/rate-limit-connections") }}