check the HTTP Host header for the hostname being accessed and look it up in your database to find the user who it belongs to.
What if I have a subdomain for the users e.g user.domain.com and they want to use their custom domain. Do I give them a custom.domain.com to point their CNAME record to?
Yes. I'm doing that with #chamados. Users can have both, a subdomain and a custom domain.
When a request arrives, I check where it belongs on my main controller and set the scope for the rest of the app.
Do you users point the CNAME record to the subdomain?
To my main domain, but I think pointing to a subdomain also works fine.
👋 Join WIP to participate