Based on the documentation included in config/initializers/comfortable_mexican_sofa.rb...
# Site aliases, if you want to have aliases for your site. Good for harmonizing
# production env with dev/testing envs.
# e.g. config.hostname_aliases = {'host.com' => 'host.inv', 'host_a.com' => ['host.lvh.me', 'host.dev']}
# Default is nil (not used)
... there's no mention of needing to include the port with host aliases.
So it appears at first glance that if you:
Create a site with host myhost.com, a layout, and a basic page;
Note: For general questions and feature requests please leave a message on Gitter: https://gitter.im/comfy/comfortable-mexican-sofa
Expected behavior
Based on the documentation included in
config/initializers/comfortable_mexican_sofa.rb
...... there's no mention of needing to include the port with host aliases.
So it appears at first glance that if you:
myhost.com
, a layout, and a basic page;config.hostname_aliases = { "myhost.com" => "myhost.lvh.me" }
;myhost.lvh.me
You should be served that basic page for
myhost.com
.Actual behavior
However, if you're running in the standard Rails dev mode and serving off of port 3000, site lookup fails.
Steps to reproduce
This line in BaseController.rb:
... shows that the port is taken into consideration.
I'm happy to make a patch to improve the documentation in the initializer, but I wanted to check that you want to consider the port first.
System configuration
Rails version: 6.0
CMS version: 2.0.19
Ruby version: 2.6