-

To allow requests to <%= @host %> make sure it is a valid hostname (containing only numbers, letters, dashes and dots), then add the following to your environment configuration:

-
config.hosts << "<%= @host %>"
+

To allow requests to these hosts, make sure they are valid hostnames (containing only numbers, letters, dashes and dots), then add the following to your environment configuration:

+
+  <% @hosts.each do |host| %>
+    config.hosts << "<%= host %>"
+  <% end %>
+  

For more details view: the Host Authorization guide