From e59f00d39078894ab3651f1e5c84a426fa53b264 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 15 May 2021 14:38:32 +1000 Subject: [PATCH] Fixes for domains --- app/Http/Middleware/SetDomainNameDb.php | 2 +- tests/Feature/Import/ImportCompanyTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Middleware/SetDomainNameDb.php b/app/Http/Middleware/SetDomainNameDb.php index 74035b97a4..260de03f8a 100644 --- a/app/Http/Middleware/SetDomainNameDb.php +++ b/app/Http/Middleware/SetDomainNameDb.php @@ -60,7 +60,7 @@ class SetDomainNameDb else { $query = [ - 'portal_domain' => $request->getHost(), + 'portal_domain' => $request->getSchemeAndHttpHost(), 'portal_mode' => 'domain', ]; diff --git a/tests/Feature/Import/ImportCompanyTest.php b/tests/Feature/Import/ImportCompanyTest.php index d8134c6e52..16a7621caa 100644 --- a/tests/Feature/Import/ImportCompanyTest.php +++ b/tests/Feature/Import/ImportCompanyTest.php @@ -61,6 +61,7 @@ class ImportCompanyTest extends TestCase $backup_json_file = json_decode(file_get_contents($backup_json_file)); $this->assertTrue(property_exists($backup_json_file, 'app_version')); + $this->assertTrue(property_exists($backup_json_file, 'users')); // User::unguard();