From 34a655ee37ae20f7cfdae63b8bb9abc75c327ee4 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Sun, 26 Nov 2017 21:05:59 +0000 Subject: [PATCH] Send a 421 Misdirected error to koji from non-phx2 proxies Signed-off-by: Patrick Uiterwijk --- .../httpd/reverseproxy/templates/reversepassproxy.koji.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.koji.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.koji.conf index 9fc975a753..4617957aba 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.koji.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.koji.conf @@ -4,5 +4,10 @@ ProxyPreserveHost On ProxyTimeout 10800 TimeOut 10800 +{% if 'phx2' in inventory_hostname %} ProxyPass {{ localpath }} {{ proxyurl }}{{remotepath}} ProxyPassReverse {{ localpath }} {{ proxyurl }}{{remotepath}} +{% else %} +ErrorDocument 421 "You have hit an incorrect proxy for koji due to a bug in Firefox. Please refresh" +Redirect 421 / +{% endif %}