about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-02-23 22:17:07 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-02-23 22:17:07 +0100
commitee73d35eea024894e851d807132c3f21a133152d (patch)
tree9368486314b3665376d55e2a44ccf1f1de12fd48 /config/initializers
parentfa33750105389110a3395ca19167f789d21a149e (diff)
Incoming Salmon requests can be turned into follows and unfollows
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/ostatus.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/config/initializers/ostatus.rb b/config/initializers/ostatus.rb
index 6f00ba7ed..624ea9ca0 100644
--- a/config/initializers/ostatus.rb
+++ b/config/initializers/ostatus.rb
@@ -1,6 +1,7 @@
-LOCAL_DOMAIN = ENV['LOCAL_DOMAIN'] || 'localhost'
-HUB_URL      = ENV['HUB_URL'] || 'https://pubsubhubbub.superfeedr.com'
+LOCAL_DOMAIN       = ENV['LOCAL_DOMAIN'] || 'localhost'
+HUB_URL            = ENV['HUB_URL']      || 'https://pubsubhubbub.superfeedr.com'
+CANONICAL_PROTOCOL = ENV['LOCAL_HTTPS'] == 'true' ? 'https://' : 'http://'
 
 Rails.application.configure do
-  config.action_mailer.default_url_options = { host: LOCAL_DOMAIN }
+  config.action_mailer.default_url_options = { host: LOCAL_DOMAIN, protocol: CANONICAL_PROTOCOL }
 end