Custom subdomains in the Sinatra app

I want my Sinatra app to allow users to create an account and access it through a subdomain (i.e. your-account.myapp.com).

I found this to extract subdomains ( http://gist.github.com/55784#file_subdomains.rb ), but I find it hard to implement it.

Any ideas?

I have an account model (datamapper) with a field called the name of the account, which should be a subdomain.

Thank!

+3
source share
1 answer
+6

Source: https://habr.com/ru/post/1753429/


All Articles