From ead51deca6df2f363241387a1676e7a24137f980 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Thu, 28 Feb 2019 13:53:00 +0100 Subject: [PATCH] Honor the request scheme when redirecting the user --- htdocs/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/common.php b/htdocs/common.php index 2f511af..1c4acba 100644 --- a/htdocs/common.php +++ b/htdocs/common.php @@ -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); }