-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #19734: Redirect everything to https - Webapp
- Loading branch information
Showing
1 changed file
with
1 addition
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |