Feature-Request: Change tenant-domain from subdomain to url-parameter?
See original GitHub issueHi guys,
I am just thinking: One of the big benefits of this app is the added security layer via database-schemas. So users are probably quite security concerned and will also invest in an ssl-certificate.
Which is quite expensive for a startup… I think unlimited ssl-subdomains-certificates are around 500$ per year?
Which brings me to the point: How easy do you think would it be to implement a switch “DOMAINTYPE = SUBDOMAIN/URL-PARAMETER”?
So that instead of
tenant.domain.com
we would see
www.domain.com/tenant/*?
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Feature-Request: Change tenant-domain from subdomain to ...
Hi guys, I am just thinking: One of the big benefits of this app is the added security layer via database-schemas.
Read more >htaccess, redirect virtual subdomain to URL parameter
First I added the subdomain * under mydomain.ne.ro, pointed to domain folder/path: ... Also You can change with this(for Uppercase or Lowercase letters...
Read more >Change subdomain authentication type in Azure Active Directory
Change default subdomain authentication settings inherited from root domain settings in Azure Active Directory.
Read more >Feature request: limit matching to subdomain [not possible]
I'm not having any trouble filling logins on any matching URL. I have a.domain, b.domain, c.domain with different passwords per sub domain. But ......
Read more >Cant change my subdomain - Typeform Community
I tried to change my subdomain but not happened, showing some error. no one else has used that domain from our sidemy website...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I got it to work with something like this in python3:
custom middleware
tenants/urls.py
Looks like this is all that is needed to make
/abc
work on the public schema and/t/<tenant_id>/abc
work on the tenant schema. Django admin works as well and so do all the reverse calls django and other libs make internally.It’s easy, I have such middleware in my projects that supports both methods, thought we mostly use
/tnt/<tenant_name>/
instead of domain. It’s justprocess_response
part that is selecting current tenant, and probably adding some value to request or some global settings likesettings.URL_PREFIX
. It’s a bit more painful if you use other tools that do smth with url like django-rest-framework, as you need to hack intorest_framework.reverse.reverse
andrest_framework.reverse.reverse_lazy
, to always provide your currentURL_PREFIX
, but after you have it, it allows you to have lang in your paths (/tnt/test/en/
), and any other feature related to prefixing url path.For free certs check https://startssl.com.