allow for redirecting users to https

This commit is contained in:
Antoine Beaupr�� 2014-12-02 21:54:33 +00:00
parent da25f15da1
commit 9076d74566
1 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,10 @@ if (!$mem->del_session()) {
}
$H=getenv("HTTP_HOST");
if (variable_get('https_redirect', false, 'switch users to HTTPS') && !isset($_SERVER['HTTPS'])) {
header("Location: https://$H/");
exit();
}
if (!isset($restrictip)) {
$restrictip=1;