mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-15 15:14:03 +00:00
Identify tenants by the "Origin" header (#21)
* Add origin ID MW * Test origin ID MW * Test origin ID MW with early identification * Fix code style (php-cs-fixer) * Fix PHPStan errors * Add getDomain() to domain ID MW, simplify origin ID MW * Fix code style (php-cs-fixer) * Rename InitializeTenancyByOrigin to InitializeTenancyByOriginHeader * Add onFail test * Stop throwing the exception in getDomain() * FIx merge * Improve origin identification test file * Clean up test --------- Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
This commit is contained in:
parent
df9324b92f
commit
9e4f33e5c5
7 changed files with 124 additions and 4 deletions
|
|
@ -22,7 +22,7 @@ class InitializeTenancyByDomainOrSubdomain extends InitializeTenancyBySubdomain
|
|||
return $next($request);
|
||||
}
|
||||
|
||||
$domain = $request->getHost();
|
||||
$domain = $this->getDomain($request);
|
||||
|
||||
if ($this->isSubdomain($domain)) {
|
||||
$domain = $this->makeSubdomain($domain);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue