From c2b818ecb8cf5355dc533f0e838bda4135fd18c9 Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Wed, 11 Aug 2021 12:23:14 +0100 Subject: [PATCH] added baseUrl to config --- src/core/init/responder.php | 2 +- src/sample-config/config.sample.ini | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/init/responder.php b/src/core/init/responder.php index 6abce79..80614bf 100644 --- a/src/core/init/responder.php +++ b/src/core/init/responder.php @@ -94,7 +94,7 @@ class Responder { $response->content_type = "ms-json"; $response->content = new MSAutodiscoverJSONResponse(); $response->content->Protocol = "AutodiscoverV1"; - $response->content->Url = "https://" . $_SERVER['HTTP_HOST'] . "/Autodiscover/Autodiscover.xml"; + $response->content->Url = Core::$Config["BaseURL"] . "/Autodiscover/Autodiscover.xml"; return $response; } private function dummy_response(){ diff --git a/src/sample-config/config.sample.ini b/src/sample-config/config.sample.ini index a163648..e6ddf1d 100644 --- a/src/sample-config/config.sample.ini +++ b/src/sample-config/config.sample.ini @@ -6,6 +6,8 @@ Domain = example.com LogonDomain = example.local RequireAuthDomain = false +BaseURL = "https://autoconfig.example.com" + ; Admin User configuration ; not in use yet ;[AdminUser]