Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
config.active_storage.service = :digitalocean

app_host = ENV.fetch("APP_HOST", "localhost")

Rails.application.routes.default_url_options[:host] = app_host

config.after_initialize do
Expand Down Expand Up @@ -96,8 +95,8 @@

# Set host to be used by links generated in mailer templates.
config.action_mailer.default_url_options = {
host: "example.com",
protocol: "https"
host: ENV.fetch("APP_HOST", "localhost"),
protocol: Rails.env.production? ? "https" : "http"
}

# Specify outgoing SMTP server. Remember to add smtp/* credentials via bin/rails credentials:edit.
Expand Down