set Current.application_name
This commit is contained in:
parent
5c06430042
commit
b9fcb25f1a
2 changed files with 7 additions and 1 deletions
|
@ -31,6 +31,12 @@ class ApplicationController < ActionController::Base
|
|||
# TODO: remove this block when migration to new domain is done
|
||||
# headers['Host'] instead of request.host to keep the port (ex: localhost:3000)
|
||||
Current.host = request.headers['Host']
|
||||
|
||||
if Current.host.include?("gouv.fr")
|
||||
Current.application_name = "demarches.gouv.fr"
|
||||
else
|
||||
Current.application_name = APPLICATION_NAME
|
||||
end
|
||||
end
|
||||
|
||||
def staging_authenticate
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
class Current < ActiveSupport::CurrentAttributes
|
||||
attribute :user, :request_id, :browser, :host
|
||||
attribute :user, :request_id, :browser, :host, :application_name
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue