From 0e8ecb4e477371c4f69c0c5796add82382e0e773 Mon Sep 17 00:00:00 2001 From: Alexis Mousset Date: Mon, 9 Aug 2021 15:39:39 +0200 Subject: [PATCH] Fixes #19734: Redirect everything to https - Webapp --- .../SOURCES/rudder-apache-webapp-nossl.conf | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/rudder-webapp/SOURCES/rudder-apache-webapp-nossl.conf b/rudder-webapp/SOURCES/rudder-apache-webapp-nossl.conf index 0b173d7d2..78de440bc 100644 --- a/rudder-webapp/SOURCES/rudder-apache-webapp-nossl.conf +++ b/rudder-webapp/SOURCES/rudder-apache-webapp-nossl.conf @@ -1,23 +1 @@ -# Rudder webapp -RewriteEngine on - -# Rule 1 - If hitting the server root, redirect to Rudder -RewriteRule ^/$ /rudder [R] - -# Rule 2 - If we are not currently connected via HTTP/S -RewriteCond %{HTTPS} !=on - -# Rule 2 - Don't use HTTP/S for these URLs to avoid breaking the compatibility for cURL -# clients (especially in Techniques) -RewriteCond %{REQUEST_URI} !^/rudder-(not-loaded|loading).html -RewriteCond %{REQUEST_URI} !^/uuid -RewriteCond %{REQUEST_URI} !^/inventories/? -RewriteCond %{REQUEST_URI} !^/inventory-updates/? -RewriteCond %{REQUEST_URI} !^/api/? -RewriteCond %{REQUEST_URI} !^/rudder/relay-api/? - -# Rule 2 - Restrict redirection to Rudder webapp -RewriteCond %{REQUEST_URI} ^/rudder/? - -# Rule 2 - Redirect to HTTP/S -RewriteRule ^/(.*)$ https://%{SERVER_NAME}/$1 [R] +# redirection to https is done in relay configuration