summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorSimon Rettberg2015-06-03 14:26:22 +0200
committerSimon Rettberg2015-06-03 14:26:22 +0200
commit5136f6622e7ca87695c158a31cb8e78299f1967a (patch)
tree554c58c63fdbf58401fcf4e49ac9685e1eff9634 /index.php
parentAdd AddUser mask for creating test accounts (diff)
downloadbwlp-webadmin-5136f6622e7ca87695c158a31cb8e78299f1967a.tar.gz
bwlp-webadmin-5136f6622e7ca87695c158a31cb8e78299f1967a.tar.xz
bwlp-webadmin-5136f6622e7ca87695c158a31cb8e78299f1967a.zip
Allow registration, add support for creating test accounts, rename satellite to organization
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/index.php b/index.php
index 8e06975..3b8250a 100644
--- a/index.php
+++ b/index.php
@@ -2,12 +2,18 @@
$dest = @readlink($_SERVER['SCRIPT_FILENAME']);
if (!empty($dest) && $dest !== $_SERVER['SCRIPT_FILENAME']) {
- //error_log($dest . ' !== ' . $_SERVER['SCRIPT_FILENAME'] . ', chdir to ' . dirname($dest));
chdir(dirname($dest));
}
require_once 'config.php';
+if (defined('CONFIG_FORCE_DOMAIN')) {
+ if (!empty($_SERVER['SERVER_NAME']) && strcasecmp($_SERVER['SERVER_NAME'], CONFIG_FORCE_DOMAIN) !== 0) {
+ Header('HTTP/1.1 400 Bad Request');
+ die('<h1>Bad Request</h1>');
+ }
+}
+
/**
* Page class which all "modules" must be extending from