From 16c2787a5667f18da42032251869ee7a70594c1c Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Tue, 19 Mar 2019 22:41:54 +0000 Subject: [PATCH] proxies: Adding remotepath to websocket balancers The current template assumes that websockets are at the base of a URL but that is not true for our buildmaster. This patch adds remotepath to the end of the websocket url if remotepath is defined. --- roles/httpd/reverseproxy/templates/reversepassproxy.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.conf index deec40b9f3..38950e44af 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.conf @@ -29,10 +29,18 @@ SSLProxyEngine On {% for member in balancer_members %} {% if http_not_https_yes_this_is_insecure_and_i_feel_bad %} + {% if remotepath is defined %} + BalancerMember "ws://{{ member }}{{ remotepath }} + {% else %} BalancerMember "ws://{{ member }}" + {% endif %} + {% else %} + {% if remotepath is defined %} + BalancerMember "wss://{{ member }}{{ remotepath }} {% else %} BalancerMember "wss://{{ member }}" {% endif %} + {% endif %} {% endfor %}