Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #19734: Redirect everything to https - Webapp #2508

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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