aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/templates
diff options
context:
space:
mode:
authorMarc Schütz <schuetzm@gmx.net>2019-01-20 13:04:20 +0100
committerMarc Schütz <schuetzm@gmx.net>2019-01-23 13:11:35 +0100
commitee0d0b1220adda0ee48f67cc4340ff4d702f6ed9 (patch)
tree46e0b84697d657bfa787d66ab8aa5ac42fa8e4a8 /actionpack/lib/action_dispatch/middleware/templates
parent9608b180bfb36cb459e4aa8d8116a065046e1915 (diff)
downloadrails-ee0d0b1220adda0ee48f67cc4340ff4d702f6ed9.tar.gz
rails-ee0d0b1220adda0ee48f67cc4340ff4d702f6ed9.tar.bz2
rails-ee0d0b1220adda0ee48f67cc4340ff4d702f6ed9.zip
Recommend adding the requested domain to hosts whitelist only in development
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/templates')
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb4
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.text.erb4
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb
index 2fa78dd385..1fbc107e28 100644
--- a/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb
+++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb
@@ -2,6 +2,6 @@
<h1>Blocked host: <%= @host %></h1>
</header>
<div id="container">
- <h2>To allow requests to <%= @host %>, add the following configuration:</h2>
- <pre>Rails.application.config.hosts &lt;&lt; "<%= @host %>"</pre>
+ <h2>To allow requests to <%= @host %>, add the following to your environment configuration:</h2>
+ <pre>config.hosts &lt;&lt; "<%= @host %>"</pre>
</div>
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.text.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.text.erb
index 4e2d1d0b08..a94dd982a7 100644
--- a/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.text.erb
+++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.text.erb
@@ -1,5 +1,5 @@
Blocked host: <%= @host %>
-To allow requests to <%= @host %>, add the following configuration:
+To allow requests to <%= @host %>, add the following to your environment configuration:
- Rails.application.config.hosts << "<%= @host %>"
+ config.hosts << "<%= @host %>"