summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorSimon Rettberg2025-05-07 16:57:01 +0200
committerSimon Rettberg2025-05-07 16:57:01 +0200
commit8eed192b1c41f3f261b4981e763bf8e64e11fb79 (patch)
treee046b9f0b1e7bab9e21d7704cb77c3bf227a14c3 /index.php
parent[locations] Better warning text when deleting a room (diff)
downloadslx-admin-8eed192b1c41f3f261b4981e763bf8e64e11fb79.tar.gz
slx-admin-8eed192b1c41f3f261b4981e763bf8e64e11fb79.tar.xz
slx-admin-8eed192b1c41f3f261b4981e763bf8e64e11fb79.zip
index.php: Add comment to hostname redirect check stuff
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/index.php b/index.php
index c8542b80..73dc6e0d 100644
--- a/index.php
+++ b/index.php
@@ -35,6 +35,14 @@ spl_autoload_register(function ($class) {
require_once $file;
});
+/*
+ * The client calls this if accessing the server by ip address or unknown hostname,
+ * but the webinterface config says to redirect users to the configured main domain.
+ * This call is used to verify that when switching to the domain name, we actually
+ * talk to the same server. Only if the returned data matched the expected data,
+ * the client will do the redirect. See main/templates/domain-redirect-check.html
+ * for the according logic.
+ */
if (($_GET['do'] ?? '') === '_https_magic') {
Header('Access-Control-Allow-Origin: *');
Header('Content-Type: application/json');