diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-08-18 18:51:50 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-08-18 18:51:50 +0200 |
commit | 68c93f8b859617fb6bb2dc5cf6c5f9a6362bf6a8 (patch) | |
tree | e7c9d8a8740e5a6206a7050fe70a16972388f68a /config/initializers | |
parent | 8985f8e66cabdc65dc3d81a3653f46d6e9799980 (diff) |
Final fix for ActionCable origin issues
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/ostatus.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/config/initializers/ostatus.rb b/config/initializers/ostatus.rb index 3cb17c718..6aada2c32 100644 --- a/config/initializers/ostatus.rb +++ b/config/initializers/ostatus.rb @@ -4,4 +4,8 @@ Rails.application.configure do config.x.use_https = ENV['LOCAL_HTTPS'] == 'true' config.action_mailer.default_url_options = { host: config.x.local_domain, protocol: config.x.use_https ? 'https://' : 'http://' } + + if Rails.env.production? + config.action_cable.allowed_request_origins = ["http#{config.x.use_https ? 's' : ''}://#{config.x.local_domain}"] + end end |