From 637ed5d0ac850af7d11dd97acd82b599bf3b8c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Mon, 1 Jun 2020 22:44:44 +0200 Subject: [PATCH] MAPG-99 use HTTP_HOST instead of SERVER_NAME to prevent wrong redirection --- public/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.php b/public/index.php index a740c2e..6d774ed 100644 --- a/public/index.php +++ b/public/index.php @@ -3,7 +3,7 @@ require '../main.php'; // very basic routing -$host = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['SERVER_NAME']; +$host = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']; $method = strtolower($_SERVER['REQUEST_METHOD']); $url = substr($_SERVER['REQUEST_URI'], strlen('/')); if (($pos = strpos($url, '?')) !== false) {