lib/hanami/welcome.rb in hanami-1.3.2 vs lib/hanami/welcome.rb in hanami-1.3.3

- old
+ new

@@ -12,10 +12,11 @@ end # @api private def call(env) @request_path = env['REQUEST_PATH'] || '' + @request_host = env['HTTP_HOST'] || '' @body = [ERB.new(@root.join('welcome.html.erb').read).result(binding)] [200, {}, @body] end @@ -27,10 +28,14 @@ private # @api private def application_class Hanami.configuration.apps do |app| - return app if @request_path.include?(app.path_prefix) + if app.host.nil? + return app if @request_path.include?(app.path_prefix) + else + return app if @request_host == app.host + end end end end end