Merge pull request #3017 from betagouv/fix-missing-host-in-email-assets
config: fix email assets not having the full URL domain prepended
This commit is contained in:
commit
b596956761
2 changed files with 10 additions and 0 deletions
|
@ -46,6 +46,13 @@ Rails.application.configure do
|
|||
|
||||
# Action Mailer settings
|
||||
config.action_mailer.delivery_method = :letter_opener_web
|
||||
# Configure default root URL for generating URLs to routes
|
||||
config.action_mailer.default_url_options = {
|
||||
host: 'localhost',
|
||||
port: 3000
|
||||
}
|
||||
# Configure default root URL for email assets
|
||||
config.action_mailer.asset_host = "http://" + ENV['APP_HOST']
|
||||
|
||||
Rails.application.routes.default_url_options = {
|
||||
host: 'localhost',
|
||||
|
|
|
@ -81,10 +81,13 @@ Rails.application.configure do
|
|||
config.action_mailer.delivery_method = :mailjet
|
||||
end
|
||||
|
||||
# Configure default root URL for generating URLs to routes
|
||||
config.action_mailer.default_url_options = {
|
||||
protocol: :https,
|
||||
host: ENV['APP_HOST']
|
||||
}
|
||||
# Configure default root URL for email assets
|
||||
config.action_mailer.asset_host = "https://" + ENV['APP_HOST']
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
|
|
Loading…
Reference in a new issue