This repository was archived by the owner on Aug 8, 2021. It is now read-only.
Define primary subdomains#15
Open
pperejon wants to merge 4 commits intopronique:masterfrom
Open
Conversation
In the configuration options of the plugin, primarySubdomains can be defined so any of these subdomains in combination with the primaryDomain will also be considered as primary. Also make some CS fixins.
Using the session strategy the tenant is identified using the value stored in a path in the current session.
You can choose the "configuration" strategy, and the plugin will use the key you choose to set up the current tenant using the CakePHP Configuration class.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You can have a primary domain called example.com. All the tenants will finish with that: tenant1.example.com, you.example.com, .. etc... The problem is that if you define it that way, "www.example.com" won't be considered as primary.
Here I've introduced a new optional parameter primarySubdomains that you can use to define multiple subdomains that, in conjunction with the primaryDomain will also be considered as primary.
This PR is fully backwards compatible.
Also made some CS fixins.