Problem with InitializeTenancyByDomainOrSubdomain when domain is similar to central domain
Bug description
Case using InitializeTenancyByDomainOrSubdomain
Central domain: tms.test Tenant 1 Subdomain: test1.tms.test Tenant 1 Domain: test1-tms.test (Does not work) Alternative Tenant 1 Domain: test1-tenant.test (Does work)
Conclusion: The tenant 1 domain test1-tms.test is very similar to the central domain tms.test. Could this be the reason why the test1-tms.test is not identified?
Steps to reproduce
Fresh Laravel installation with Tenancy. Followed the Quick Start Guide (using Sail). And setup one tenant with domains like described above.
Expected behavior
I would expect any subdomain or domain to be identified. Also if it is similar to the central domain.
Laravel version
12
stancl/tenancy version
3
I have tried the exact same setup and http://test1-tms.test/ is identified as it should be. Can you share the code?
I have tried the exact same setup and
http://test1-tms.test/is identified as it should be. Can you share the code?
Okay, I have added it in this repo: https://github.com/jakobjp/laravel-tenancy-domains-test