fix: multi FC do not change const

This commit is contained in:
simon lehericey 2024-04-17 15:33:37 +02:00
parent e01e98c05f
commit ca4ab4cfe1
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5

View file

@ -1,12 +1,12 @@
class FranceConnectParticulierClient < OpenIDConnect::Client
def initialize(code = nil)
config = FRANCE_CONNECT[:particulier]
config = FRANCE_CONNECT[:particulier].deep_dup
# TODO: remove this block when migration to new domain is done
# dirty hack to redirect to the right domain
# if !Rails.env.test? && Current.host != ENV.fetch("APP_HOST")
# config[:redirect_uri] = config[:redirect_uri].gsub(ENV.fetch("APP_HOST"), Current.host)
# end
if !Rails.env.test? && Current.host != ENV.fetch("APP_HOST")
config[:redirect_uri] = config[:redirect_uri].gsub(ENV.fetch("APP_HOST"), Current.host)
end
super(config)