fix: remove buggy scheme on localhost

This commit is contained in:
sehnryr
2022-10-15 18:47:24 +02:00
committed by Youn Mélois
parent 745b563101
commit 849b3fc708

View File

@@ -13,9 +13,8 @@
*/
function redirect(string $page): void
{
$scheme = $_SERVER['REQUEST_SCHEME'];
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
header("Location: $scheme://$host$uri/$page");
header("Location: //$host$uri/$page");
exit;
}