mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 20:54:03 +00:00
Merge branch 'conflicting-routes' of github.com:stancl/tenancy into conflicting-routes
This commit is contained in:
commit
ad424dcdd3
1 changed files with 3 additions and 3 deletions
|
|
@ -17,9 +17,9 @@ class PreventAccessFromTenantDomains
|
||||||
{
|
{
|
||||||
// If the domain is not in exempt domains, it's a tenant domain.
|
// If the domain is not in exempt domains, it's a tenant domain.
|
||||||
// Tenant domains can't have routes without tenancy middleware.
|
// Tenant domains can't have routes without tenancy middleware.
|
||||||
if (! in_array(request()->getHost(), config('tenancy.exempt_domains')) &&
|
if (! \in_array(request()->getHost(), config('tenancy.exempt_domains')) &&
|
||||||
! in_array('tenancy', request()->route()->middleware())) {
|
! \in_array('tenancy', request()->route()->middleware())) {
|
||||||
abort(404);
|
abort(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue