From 6c5d984efab8a6c1b3da2f94e6d1b395e140d7c2 Mon Sep 17 00:00:00 2001
From: Sandro Santilli <strk@kbt.io>
Date: Tue, 23 Aug 2022 06:05:14 +0200
Subject: [PATCH] Do not assume script is installed in root dir (#20)

---
 index.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.php b/index.php
index 4d323a0..57bdb63 100755
--- a/index.php
+++ b/index.php
@@ -20,7 +20,7 @@ class CONFIG
     public static function SITE_URL() : string
     {
         $proto = ($_SERVER['HTTPS'] ?? 'off') == 'on' ? 'https' : 'http';
-        return "$proto://{$_SERVER['HTTP_HOST']}/";
+        return "$proto://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
     }
 };