Skip to content

Commit 46cbfea

Browse files
committed
Fix test setup for Github Codespaces
As soon as any value is set for `config.hosts`, the respective request must match one of the entries. For the test environment, we don't want to enforce any checking and thus disable it.
1 parent 94ed1c1 commit 46cbfea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/initializers/github_codespaces.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def webpack_dev_server
3838
end
3939
end
4040

41-
if GithubCodespaces.active? && defined? Rails
41+
if GithubCodespaces.active? && defined?(Rails) && !Rails.env.test?
4242
Rails.application.configure do
4343
# Allow the Rails server to be accessed from the Codespaces domain
4444
config.hosts << GithubCodespaces.domain_for(:rails_server)

0 commit comments

Comments
 (0)