Ticket #1486411: force_https.patch
| File force_https.patch, 646 bytes (added by nicklaus.little, 3 years ago) |
|---|
-
index.php
a b 67 67 if (empty($_SESSION['user_id']) && ($force_https = $RCMAIL->config->get('force_https', false))) { 68 68 $https_port = is_bool($force_https) ? 443 : $force_https; 69 69 if (!rcube_https_check($https_port)) { 70 header('Location: https://' . $_SERVER['HTTP_HOST']. ($https_port != 443 ? ':' . $https_port : '') . $_SERVER['REQUEST_URI']);70 header('Location: https://' . preg_replace('/^([^:]+).*$/', '$1', $_SERVER['HTTP_HOST']) . ($https_port != 443 ? ':' . $https_port : '') . $_SERVER['REQUEST_URI']); 71 71 exit; 72 72 } 73 73 }
