2023-07-12 10:47:08 +03:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-12-15 16:33:56 +02:00
|
|
|
unless Rails.application.config.action_dispatch.trusted_proxies.nil?
|
|
|
|
# Rack is configured with a default collection of trusted proxies
|
|
|
|
# If Rails has been configured to use a specific list, configure
|
|
|
|
# Rack to use this Proc, which enforces the Rails-configured list.
|
|
|
|
Rack::Request.ip_filter = ->(ip) { Rails.application.config.action_dispatch.trusted_proxies.include?(ip) }
|
2017-01-22 22:01:28 +02:00
|
|
|
end
|