set Current.application_base_url

This commit is contained in:
simon lehericey 2024-03-19 22:31:27 +01:00
parent d99f489fd6
commit 4c3b0229eb
2 changed files with 5 additions and 1 deletions

View file

@ -35,9 +35,11 @@ class ApplicationController < ActionController::Base
if Current.host.include?("gouv.fr")
Current.application_name = "demarches.gouv.fr"
Current.contact_email = "contact@demarches.gouv.fr"
Current.application_base_url = "https://demarches.gouv.fr"
else
Current.application_name = APPLICATION_NAME
Current.contact_email = CONTACT_EMAIL
Current.application_base_url = Current.application_base_url
end
end

View file

@ -1,3 +1,5 @@
class Current < ActiveSupport::CurrentAttributes
attribute :user, :request_id, :browser, :host, :application_name, :contact_email
attribute :user, :request_id, :browser,
:host, :application_name, :contact_email,
:application_base_url
end