Merge pull request #6902 from adullact/feature/6860-custom-app-host

Rend l'environnement de développement accessible depuis un hôte autre que localhost:3000
This commit is contained in:
Pierre de La Morinerie 2022-02-15 09:01:59 +01:00 committed by GitHub
commit 2746c2dedf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,15 +77,12 @@ Rails.application.configure do
# Action Mailer settings
config.action_mailer.delivery_method = :letter_opener
config.action_mailer.default_url_options = {
host: 'localhost',
port: 3000
}
config.action_mailer.asset_host = "http://" + ENV['APP_HOST']
config.action_mailer.default_url_options = { host: ENV.fetch("APP_HOST") }
config.action_mailer.asset_host = "http://" + ENV.fetch("APP_HOST")
Rails.application.routes.default_url_options = {
host: 'localhost',
port: 3000
host: ENV.fetch("APP_HOST"),
protocol: :http
}
# Use Content-Security-Policy-Report-Only headers
@ -111,4 +108,6 @@ Rails.application.configure do
if ENV['IGN_CARTE_REFERER']
config.hosts << ENV['IGN_CARTE_REFERER']
end
config.hosts << ENV.fetch("APP_HOST")
end