mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX: force https: infinite redirection in case the access is already secure
This commit is contained in:
parent
ebf5fd261b
commit
0d2d607c48
|
|
@ -466,7 +466,7 @@ if (GETPOST('textbrowser', 'int') || (!empty($conf->browser->name) && $conf->bro
|
|||
|
||||
// Force HTTPS if required ($conf->file->main_force_https is 0/1 or 'https dolibarr root url')
|
||||
// $_SERVER["HTTPS"] is 'on' when link is https, otherwise $_SERVER["HTTPS"] is empty or 'off'
|
||||
if (!empty($conf->file->main_force_https) && isHTTPS() && !defined('NOHTTPSREDIRECT')) {
|
||||
if (!empty($conf->file->main_force_https) && !isHTTPS() && !defined('NOHTTPSREDIRECT')) {
|
||||
$newurl = '';
|
||||
if (is_numeric($conf->file->main_force_https)) {
|
||||
if ($conf->file->main_force_https == '1' && !empty($_SERVER["SCRIPT_URI"])) { // If SCRIPT_URI supported by server
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user