Merge commit 'f99e05710ea06cf10bbd3fb64ae8c00b095cb455' into glitch-soc/merge-upstream
Conflicts: - `.rubocop_todo.yml`: Took upstream's version of the conflicting lines.
This commit is contained in:
commit
f5b7307890
65 files changed
+2346
-661
No files matched your search
@@ -175,7 +175,7 @@ SimpleForm.setup do |config|
|
||||
# config.item_wrapper_class = nil
|
||||
|
||||
# How the label text should be generated altogether with the required text.
|
||||
config.label_text = lambda { |label, required, _explicit_label| "#{label} #{required}" }
|
||||
config.label_text = ->(label, required, _explicit_label) { "#{label} #{required}" }
|
||||
|
||||
# You can define the class to use on all labels. Default is nil.
|
||||
# config.label_class = nil
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Rack
|
||||
class Request
|
||||
def trusted_proxy?(ip)
|
||||
if Rails.application.config.action_dispatch.trusted_proxies.nil?
|
||||
super
|
||||
else
|
||||
Rails.application.config.action_dispatch.trusted_proxies.any? { |proxy| proxy === ip }
|
||||
end
|
||||
end
|
||||
end
|
||||
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) }
|
||||
end
|
||||
Reference in new issue
Block a user