1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/test/dispatch
Chris Bisnett 1f767407cb Add request exclusion to Host Authorization
In the same way that requests may need to be excluded from forced SSL,
requests may also need to be excluded from the Host Authorization
checks. By providing this additional flexibility more applications
will be able to enable Host Authorization while excluding requests
that may not conform. For example, AWS Classic Load Balancers don't
provide a Host header and cannot be configured to send one. This means
that Host Authorization must be disabled to use the health check
provided by the load balancer. This change will allow an application
to exclude the health check requests from the Host Authorization
requirements.

I've modified the `ActionDispatch::HostAuthorization` middleware to
accept arguments in a similar way to `ActionDispatch::SSL`. The hosts
configuration setting still exists separately as does the
hosts_response_app but I've tried to group the Host Authorization
settings like the ssl_options. It may make sense to deprecate the
global hosts_response_app if it's only used as part of the Host
Authorization failure response. I've also updated the existing tests
as the method signature changed and added new tests to verify the
exclusion functionality.
2020-11-02 20:16:29 +00:00
..
request
routing
session
system_testing
actionable_exceptions_test.rb
callbacks_test.rb
content_disposition_test.rb
content_security_policy_test.rb
cookies_test.rb
debug_exceptions_test.rb
debug_locks_test.rb
exception_wrapper_test.rb
executor_test.rb
feature_policy_test.rb
header_test.rb
host_authorization_test.rb Add request exclusion to Host Authorization 2020-11-02 20:16:29 +00:00
live_response_test.rb
mapper_test.rb
middleware_stack_test.rb
mime_type_test.rb
mount_test.rb
prefix_generation_test.rb
rack_cache_test.rb
reloader_test.rb
request_id_test.rb
request_test.rb
response_test.rb
routing_assertions_test.rb
routing_test.rb
runner_test.rb
show_exceptions_test.rb
ssl_test.rb
static_test.rb
test_request_test.rb
test_response_test.rb
uploaded_file_test.rb
url_generation_test.rb