Honor the request scheme when redirecting the user

This commit is contained in:
Ludovic Poujol 2019-02-28 13:53:00 +01:00
parent 2125055409
commit ead51deca6

View file

@ -27,7 +27,7 @@ function test_exist($file) {
}
function http_redirect($path) {
header('Location: http://'.$_SERVER['HTTP_HOST'].$path);
header('Location: '.$_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$path);
exit(0);
}