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
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
..
abstract Unify raise_on_missing_translations for views and controllers 2020-05-20 02:42:59 +03:00
assertions Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
controller Merge pull request #38261 from vipulnsward/wrapper-support-alias-attrs 2020-11-01 12:42:37 +00:00
dispatch Add request exclusion to Host Authorization 2020-11-02 20:16:29 +00:00
fixtures Allow rails to serve brotli encoded assets 2020-06-01 08:57:02 -07:00
journey Move Path::Pattern factories into test helper 2020-07-27 12:23:33 -04:00
lib Include layout when rendering objects from controllers 2020-10-14 11:49:45 -06:00
routing Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
support Move Path::Pattern factories into test helper 2020-07-27 12:23:33 -04:00
abstract_unit.rb Stop using a singleton for routes 2020-07-14 13:46:54 -04:00