uses server_name from secrets
This commit is contained in:
@@ -2,3 +2,4 @@
|
|||||||
recaptcha_public_key: <%= ENV["MADRID_RECAPTCHA_PUBLIC_KEY"] %>
|
recaptcha_public_key: <%= ENV["MADRID_RECAPTCHA_PUBLIC_KEY"] %>
|
||||||
recaptcha_private_key: <%= ENV["MADRID_RECAPTCHA_PRIVATE_KEY"] %>
|
recaptcha_private_key: <%= ENV["MADRID_RECAPTCHA_PRIVATE_KEY"] %>
|
||||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
||||||
|
server_name: <%= fetch(:server_name) %>
|
||||||
@@ -1,8 +1,3 @@
|
|||||||
def deploysecret(key)
|
|
||||||
@deploy_secrets_yml ||= YAML.load_file('config/deploy-secrets.yml')['production']
|
|
||||||
@deploy_secrets_yml[key.to_s]
|
|
||||||
end
|
|
||||||
|
|
||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
@@ -68,7 +63,7 @@ Rails.application.configure do
|
|||||||
# Ignore bad email addresses and do not raise email delivery errors.
|
# Ignore bad email addresses and do not raise email delivery errors.
|
||||||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||||
config.action_mailer.raise_delivery_errors = true
|
config.action_mailer.raise_delivery_errors = true
|
||||||
config.action_mailer.default_url_options = { host: deploysecret(:server_name) }
|
config.action_mailer.default_url_options = { host: Rails.application.secrets.server_name }
|
||||||
|
|
||||||
# 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).
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
def deploysecret(key)
|
|
||||||
@deploy_secrets_yml ||= YAML.load_file('config/deploy-secrets.yml')['staging']
|
|
||||||
@deploy_secrets_yml[key.to_s]
|
|
||||||
end
|
|
||||||
|
|
||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
@@ -68,7 +63,7 @@ Rails.application.configure do
|
|||||||
# Ignore bad email addresses and do not raise email delivery errors.
|
# Ignore bad email addresses and do not raise email delivery errors.
|
||||||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||||
config.action_mailer.raise_delivery_errors = true
|
config.action_mailer.raise_delivery_errors = true
|
||||||
config.action_mailer.default_url_options = { host: deploysecret(:server_name) }
|
config.action_mailer.default_url_options = { host: Rails.application.secrets.server_name }
|
||||||
|
|
||||||
# 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).
|
||||||
|
|||||||
Reference in New Issue
Block a user