diff options
author | Sam Aarons <samaarons@gmail.com> | 2014-08-20 15:42:32 -0700 |
---|---|---|
committer | Sam Aarons <samaarons@gmail.com> | 2014-08-21 18:38:08 -0700 |
commit | f9a84bb2361d7ec2147ca9e104f66ceb159a4039 (patch) | |
tree | 3bee67962e0b841dd415a149b765e49b7bcf7ac5 /activejob | |
parent | a57f7b57976c74dd76c911f867b76197119546e6 (diff) | |
download | rails-f9a84bb2361d7ec2147ca9e104f66ceb159a4039.tar.gz rails-f9a84bb2361d7ec2147ca9e104f66ceb159a4039.tar.bz2 rails-f9a84bb2361d7ec2147ca9e104f66ceb159a4039.zip |
Refactor ActionDispatch::RemoteIp
Refactored IP address checking in ActionDispatch::RemoteIp to rely on
the IPAddr class instead of the unwieldly regular expression to match
IP addresses. This commit keeps the same api but allows users to pass
IPAddr objects to config.action_dispatch.trusted_proxies in addition
to passing strings and regular expressions.
Example:
# config/environments/production.rb
config.action_dispatch.trusted_proxies = IPAddr.new('4.8.15.0/16')
Diffstat (limited to 'activejob')
0 files changed, 0 insertions, 0 deletions