Merge remote-tracking branch 'parent/main' into upstream-20231221
This commit is contained in:
commit
a6b57e3890
154 changed files with 7762 additions and 1748 deletions
|
@ -79,7 +79,7 @@ Devise.setup do |config|
|
|||
oidc_options[:client_auth_method] = ENV['OIDC_CLIENT_AUTH_METHOD'] if ENV['OIDC_CLIENT_AUTH_METHOD'] # OPTIONAL (default: basic)
|
||||
scope_string = ENV['OIDC_SCOPE'] if ENV['OIDC_SCOPE'] # NEED
|
||||
scopes = scope_string.split(',')
|
||||
oidc_options[:scope] = scopes.map { |x| x.to_sym }
|
||||
oidc_options[:scope] = scopes.map(&:to_sym)
|
||||
oidc_options[:response_type] = ENV['OIDC_RESPONSE_TYPE'] if ENV['OIDC_RESPONSE_TYPE'] # OPTIONAL (default: code)
|
||||
oidc_options[:response_mode] = ENV['OIDC_RESPONSE_MODE'] if ENV['OIDC_RESPONSE_MODE'] # OPTIONAL (default: query)
|
||||
oidc_options[:display] = ENV['OIDC_DISPLAY'] if ENV['OIDC_DISPLAY'] # OPTIONAL (default: page)
|
||||
|
|
|
@ -188,7 +188,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue