mirror of
https://github.com/friendica/friendica
synced 2024-11-17 22:23:41 +00:00
Reload a non-ssl-request to a ssl-request. (only when SSL_POLICY_FULL is enabled)
This commit is contained in:
parent
9d6bcd2572
commit
68e75b4623
2 changed files with 11 additions and 0 deletions
4
boot.php
4
boot.php
|
@ -609,6 +609,10 @@ if(! class_exists('App')) {
|
|||
return($basepath);
|
||||
}
|
||||
|
||||
function get_scheme() {
|
||||
return($this->scheme);
|
||||
}
|
||||
|
||||
function get_baseurl($ssl = false) {
|
||||
|
||||
$scheme = $this->scheme;
|
||||
|
|
|
@ -53,6 +53,13 @@ if(!$install) {
|
|||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
if ((intval(get_config('system','ssl_policy')) == SSL_POLICY_FULL) AND
|
||||
($a->get_scheme() == "http") AND
|
||||
(substr($a->get_baseurl(), 0, 8) == "https://")) {
|
||||
header("HTTP/1.1 302 Moved Temporarily");
|
||||
header("location: ".$a->get_baseurl()."/".$a->query_string);
|
||||
}
|
||||
|
||||
require_once("include/session.php");
|
||||
load_hooks();
|
||||
call_hooks('init_1');
|
||||
|
|
Loading…
Reference in a new issue