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
|
# Action Mailer settings
|
||||||
config.action_mailer.delivery_method = :letter_opener_web
|
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 = {
|
Rails.application.routes.default_url_options = {
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
|
|
|
@ -81,10 +81,13 @@ Rails.application.configure do
|
||||||
config.action_mailer.delivery_method = :mailjet
|
config.action_mailer.delivery_method = :mailjet
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Configure default root URL for generating URLs to routes
|
||||||
config.action_mailer.default_url_options = {
|
config.action_mailer.default_url_options = {
|
||||||
protocol: :https,
|
protocol: :https,
|
||||||
host: ENV['APP_HOST']
|
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
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||||
# the I18n.default_locale when a translation cannot be found).
|
# the I18n.default_locale when a translation cannot be found).
|
||||||
|
|
Loading…
Reference in a new issue