From 0993c25e66f107b749e939997950c3541c3212d8 Mon Sep 17 00:00:00 2001 From: Finn Stutzenstein Date: Mon, 17 Aug 2020 13:36:42 +0200 Subject: [PATCH] Fix HaProxy redirection and client --- haproxy/src/haproxy.cfg | 41 ++++++++++++++++++++++------------------- openslides-client | 2 +- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/haproxy/src/haproxy.cfg b/haproxy/src/haproxy.cfg index bed4af1a5..5c0a2ba4c 100644 --- a/haproxy/src/haproxy.cfg +++ b/haproxy/src/haproxy.cfg @@ -14,29 +14,32 @@ defaults log global option httplog -frontend uplink - mode tcp - bind :8000 - tcp-request inspect-delay 2s - tcp-request content accept if HTTP - tcp-request content accept if { req.ssl_hello_type 1 } - use_backend receive_http if HTTP - default_backend receive_https -backend receive_http - mode tcp - server loopback-for-http abns@http send-proxy-v2 -backend receive_https - mode tcp - server loopback-for-https abns@https send-proxy-v2 +# We have to wait for 2.3: https://github.com/haproxy/haproxy/issues/737 +# WebSocket handling is broken in HaProxy 2.x, x<3 +#frontend uplink +# mode tcp +# bind :8000 +# tcp-request inspect-delay 2s +# tcp-request content accept if HTTP +# tcp-request content accept if { req.ssl_hello_type 1 } +# use_backend receive_http if HTTP +# default_backend receive_https +#backend receive_http +# mode tcp +# server loopback-for-http abns@http send-proxy-v2 +#backend receive_https +# mode tcp +# server loopback-for-https abns@https send-proxy-v2 -frontend http - mode http - bind abns@http accept-proxy - redirect scheme https code 301 +#frontend http +# mode http +# bind abns@http accept-proxy +# redirect scheme https code 301 frontend https mode http - bind abns@https accept-proxy ssl crt /usr/local/etc/haproxy/combined.pem alpn h2,http/1.1 + #bind abns@https accept-proxy ssl crt /usr/local/etc/haproxy/combined.pem alpn h2,http/1.1 + bind *:8000 ssl crt /usr/local/etc/haproxy/combined.pem alpn h2,http/1.1 default_backend backend_client # this is defined in the dev-*/prod-* file acl action path_beg -i /system/action diff --git a/openslides-client b/openslides-client index 0e8888fe2..3a3c444d6 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit 0e8888fe23442bf362a77cbdefca5e406dacf020 +Subproject commit 3a3c444d6495907195de1349aa475eca43ebc843