Fix #74 Can't login when SuiteCRM 8 is behind a LoadBalancer

This commit is contained in:
Chris Coleman 2024-02-19 16:46:16 -05:00 committed by GitHub
parent 41dd0421b1
commit a2f5e858a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,6 +20,12 @@ DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
# Fix #74 Redirect http to https (except when request comes from localhost).
# This is the security requirement for login.
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{HTTP_HOST}/$1 [R=301,L]
RewriteRule ^index.php.*$ - [L,NC]
# Determine the RewriteBase automatically and set it as environment variable.