Skip to content

Commit

Permalink
Fixes #19734: Redirect everything to https - Webapp
Browse files Browse the repository at this point in the history
  • Loading branch information
amousset committed Aug 9, 2021
1 parent 44e2d16 commit 0e8ecb4
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions rudder-webapp/SOURCES/rudder-apache-webapp-nossl.conf
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0e8ecb4

Please sign in to comment.