Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Commit

Permalink
Actually use a domain
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierlacan committed Aug 11, 2017
1 parent 5792d8d commit e550d06
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# APP_DOMAIN should be something like compliments.dev
# EMAIL_WHITELIST should be the email domain name
#
# Don't include the port in this domain setting.
# Don't include the port, protocol or trailing slash in this domain setting.
# Example: pluralsight.com
APP_DOMAIN=
EMAIL_WHITELIST=

Expand Down
2 changes: 1 addition & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 }
config.action_mailer.default_url_options = { host: ENV.fetch("APP_DOMAIN") }
config.action_mailer.default_url_options = { host: "http://#{ENV.fetch('APP_DOMAIN')}" }
end
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@
:enable_starttls_auto => true
}

config.action_mailer.default_url_options = { host: ENV.fetch("APP_DOMAIN") }
config.action_mailer.default_url_options = { host: "http://#{ENV.fetch('APP_DOMAIN')}" }
end
2 changes: 1 addition & 1 deletion config/initializers/session_store.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: '_compliments_session', domain: ENV["APP_DOMAIN"].sub("http://", "").sub("/","")
Rails.application.config.session_store :cookie_store, key: '_compliments_session', domain: ENV["APP_DOMAIN"]

0 comments on commit e550d06

Please sign in to comment.