chore: easier to test .gouv / new host using APP_HOST

This commit is contained in:
Colin Darie 2024-03-27 11:04:46 +01:00
parent 033b2fa63d
commit 8c0375fe6f
No known key found for this signature in database
GPG key ID: 8C76CADD40253590
4 changed files with 13 additions and 10 deletions

View file

@ -29,10 +29,9 @@ class ApplicationController < ActionController::Base
Current.user = current_user
Current.browser = browser
# 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']
Current.host = request.host_with_port
if Current.host.include?("gouv.fr")
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"