From a89863e81aa16e1283a9feb60f6f9d3c00bd7edc Mon Sep 17 00:00:00 2001 From: Jah Seng Lee Date: Sun, 28 Apr 2024 15:14:01 +0900 Subject: [PATCH] Change config.action_cable.url to be more sane --- config/environments/production.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 10287b4..352e6db 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -42,7 +42,12 @@ # Mount Action Cable outside main process or domain. # config.action_cable.mount_path = nil - config.action_cable.url = "wss://round-tomato-aaucx01kk0pnqsa92tssrxd7.herokudns.com/cable" + config.action_cable.url = ENV["HEROKU_ENV"] == "staging" ? + ( + "wss://socket.staging.nomadstation.io/cable" + ) : ( + "wss://socket.nomadstation.io/cable" + ) # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.