Allow using the lvh.me URL in development
Rails 6.0 introduced a `hosts` option which, in the development environment, defaults to all IP addresses and the `localhost` domain. However, we can't work with subdomains using `localhost`. For that purpose, the `lvh.me` domain was created [1]. So we're allowing this domain and its subdomains so we can use them while working with multitenancy in the development environment. [1] http://railscasts.com/episodes/123-subdomains-revised
This commit is contained in:
@@ -28,6 +28,10 @@ Rails.application.configure do
|
||||
config.cache_store = :null_store
|
||||
end
|
||||
|
||||
# Allow accessing the application through a domain so subdomains can be used
|
||||
config.hosts << "lvh.me"
|
||||
config.hosts << /.*\.lvh\.me/
|
||||
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
|
||||
|
||||
Reference in New Issue
Block a user