1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 03:14:04 +00:00

Merge branch 'conflicting-routes' of github.com:stancl/tenancy into conflicting-routes

This commit is contained in:
Samuel Štancl 2019-08-23 12:43:22 +02:00
commit ad424dcdd3

View file

@ -17,8 +17,8 @@ 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);
} }