Make the streaming API also handle websockets (because trying to get the browser EventSource interface to
work flawlessly was a nightmare). WARNING: This commit makes the web UI connect to the streaming API instead of ActionCable like before. This means that if you are upgrading, you should set that up beforehand.
This commit is contained in:
parent
8c0bc1309f
commit
ccb8ac8573
14 changed files with 310 additions and 132 deletions
|
@ -10,8 +10,10 @@ Rails.application.configure do
|
|||
config.x.use_s3 = ENV['S3_ENABLED'] == 'true'
|
||||
|
||||
config.action_mailer.default_url_options = { host: host, protocol: https ? 'https://' : 'http://', trailing_slash: false }
|
||||
config.x.streaming_api_base_url = 'http://localhost:4000'
|
||||
|
||||
if Rails.env.production?
|
||||
config.action_cable.allowed_request_origins = ["http#{https ? 's' : ''}://#{host}"]
|
||||
config.x.streaming_api_base_url = ENV.fetch('STREAMING_API_BASE_URL') { "http#{https ? 's' : ''}://#{host}" }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue