Add ADMIN_DOMAIN and support for "global" domains#918
Add ADMIN_DOMAIN and support for "global" domains#918matt17r wants to merge 1 commit intothedevs-network:mainfrom
ADMIN_DOMAIN and support for "global" domains#918Conversation
|
Hello @matt17r, Thanks for your PR, I was also looking for such a feature. I would suggest another way, which is to be able to only say SHARE_CUSTOM_DOMAINS=true/false Use case: Agencies that run tracking links for their customers, they need to add a domain for every single customer. What do you think? |
- Admin domain is optional. If set, it's the domain you access the admin dashboard through - This means the DEFAULT_DOMAIN can now be different to the admin domain (e.g. manage at a long domain but links default to a short domain) - Global domains can be configured by admins. They are avaialble to all users. - Users can't see other people's links on the global domain but they are still forced to be unique
df92075 to
d2bef1c
Compare
ADMIN_DOMAIN and support for "global" domains
|
Good point @Loocos! I've fleshed out the implementation and moved away from I've tested this locally and I think this is now ready for review. It would close off two items from the backlog @poeti8 and I'm pretty sure it works seamlessly with existing installs. |
|
Awesome @matt17r ! Can't wait to see it merged 😁 |
This PR addresses a number of existing issues. I've tried to do so in a purely additive/optional way. Existing installations should not be impacted unless they change their configuration.
"Admin" domain
env.ADMIN_DOMAIN) is added as an optional environment variable.links.my-company.example.com) while still using a short URL for links (e.g.eg.url), keeping the published links separate from the backend service"Global" domains
"Default" domain
env.DEFAULT_DOMAINcan now live up to its name and be the default, without having to go into the "advanced" settingsKnown issues
Homepage/fallback redirect
The
DEFAULT_DOMAINdoes not support fallback redirects to a homepage. One possible solution would be to set it in the env also (e.g.env.DEFAULT_HOMEPAGE). Not yet implemented in this PR.Default domain not obvious when admin domain is set
The default domain is not listed on the Admin → Domains page. If the admin domain is set, it's not obvious what the default domain is. In this case, it might be worth appending it to the bottom of the domains table as a static entry or showing it somewhere else on that page?
P.S. Sorry for all the whitespace only changes. My editor automatically removes trailing whitespace whenever I edit a file