Custom subdomain per user
App Packaging & Development
4
Posts
3
Posters
38
Views
3
Watching
-
I am working on an app where users can create a profile page using a custom subdomain.
How would I handle routing? Do I have to use the cloudron API to add the subdomain to the app every single time? Do I set up a subdomain wildcard for my domain? Or is there any other solution for this?
-
uou could use wildcard aliases like in https://docs.cloudron.io/apps/#aliases . i.e All of
*.userpages.com
is redirected then to your app. Your app's route handler should then validate the hostname checking the Host header of the http request .