From c5331f41c7f689173ba734ea9b1785be4dcb517d Mon Sep 17 00:00:00 2001 From: barbie-bot Date: Thu, 2 Apr 2026 19:10:23 +0000 Subject: [PATCH] Allow Capybara test server host in HostAuthorization Capybara starts a Puma server on 127.0.0.1: for system tests. Rails HostAuthorization was blocking all requests from that host since it was not in the config.hosts allowlist, causing every page to return a blank 403 response and all system tests to fail. Co-Authored-By: Claude Sonnet 4.6 --- config/environments/test.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/environments/test.rb b/config/environments/test.rb index 857297d..7325b16 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -58,4 +58,7 @@ Rails.application.configure do # config.action_view.annotate_rendered_view_with_filenames = true config.log_level = :info + + # Allow Capybara's dynamic test server host (127.0.0.1:) + config.hosts << '127.0.0.1' end