Mounting app to a domain

Hi, I saw a discussion about mounting an app to a domain and that followed with an update but it seems to not work with a subdomain as stated in the docs. It only works if I specify a full domain name. Is it expected or a bug? My workaround is to put a domain name to env and fetch it from ENV in environment.rb but that would not be needed to do if mounting worked with a subdomain name.

This does not work (order DOES matter but it’s not a problem, yet took time to realize it!):
mount MyApp1::Application, host: ‘app1’, at: ‘/’
mount MyApp2::Application, at: ‘/app2’
mount Web::Application, at: ‘/’

This works (order DOES matter but it’s not a problem, yet took time to realize it!):
mount MyApp1::Application, host: ‘app1.domain.com’, at: ‘/’
mount MyApp2::Application, at: ‘/app2’
mount Web::Application, at: ‘/’

A workaround:
mount MyApp1::Application, host: ENV.fetch(‘MY_DOMAIN_NAME’), at: ‘/’
mount MyApp2::Application, at: ‘/app2’
mount Web::Application, at: ‘/’

The domain name differs for development, production and also my local development hence the question. Thank you!