Skip to content

Commit bb36f5d

Browse files
voxiksimi
authored andcommitted
Disable Rack::Protection::HostAuthorization
Rack::Protection 4.1.0 has introduced new `Rack::Protection::HostAuthorization` [[1]]. This makes `www.example.com` host to be rejected. The easiest solution is to disable this check for the TestApp. [1]: sinatra/sinatra#2053
1 parent 75118f5 commit bb36f5d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/capybara/spec/test_app.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def initialize(string1, msg)
1919
set :static, true
2020
set :raise_errors, true
2121
set :show_exceptions, false
22+
set :host_authorization, { permitted_hosts: [] }
2223

2324
# Also check lib/capybara/spec/views/*.erb for pages not listed here
2425

0 commit comments

Comments
 (0)