aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-12-25 08:39:41 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-12-25 08:40:56 +0900
commit6a8519ca899db1b107bc3be8310e49196f341372 (patch)
tree46a927def389adaba9198fcd40c2618aa6102c0c /guides
parent4298df00ae6219b9b5b7c40f281d4fa4d66f4383 (diff)
downloadrails-6a8519ca899db1b107bc3be8310e49196f341372.tar.gz
rails-6a8519ca899db1b107bc3be8310e49196f341372.tar.bz2
rails-6a8519ca899db1b107bc3be8310e49196f341372.zip
Specify `hosts` in bug report template.
Host authentication introduced by #33145 allows only "0.0.0.0/0", "::/0" and "localhost" in the development environment. https://github.com/rails/rails/blob/4298df00ae6219b9b5b7c40f281d4fa4d66f4383/railties/lib/rails/application/configuration.rb#L33 But `rack-test` use `example.org` for default host. https://github.com/rack-test/rack-test/blob/6c07bf53adf4a4082e206561f5b9b43142fdc821/lib/rack/test.rb#L13 Therefore, if `hosts` is not specified, host authentication rejects the request. In Travis CI, this problem does not occur because `test` is specified by default in `RAILS_ENV` and `RACK_ENV`. https://docs.travis-ci.com/user/environment-variables/#default-environment-variables If user actually use it, env may not always be specified. Explicitly specify hosts in the file so that it works in any environment.
Diffstat (limited to 'guides')
-rw-r--r--guides/bug_report_templates/action_controller_master.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/guides/bug_report_templates/action_controller_master.rb b/guides/bug_report_templates/action_controller_master.rb
index 6d53e957d9..682269163a 100644
--- a/guides/bug_report_templates/action_controller_master.rb
+++ b/guides/bug_report_templates/action_controller_master.rb
@@ -14,6 +14,7 @@ require "action_controller/railtie"
class TestApp < Rails::Application
config.root = __dir__
+ config.hosts << "example.org"
secrets.secret_key_base = "secret_key_base"
config.logger = Logger.new($stdout)