Skip to content
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
pperejon:master
Open

Define primary subdomains#15
pperejon wants to merge 4 commits intopronique:masterfrom
pperejon:master

Conversation

@pperejon
Copy link
Copy Markdown
Contributor

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.

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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant