From 0a8584456e05e3dedccca3789a415080f9a43f80 Mon Sep 17 00:00:00 2001
From: Michael Dever <michaelcdever@gmail.com>
Date: Thu, 16 Jun 2016 21:04:43 +0100
Subject: Allow actioncable connections from any port in development

---
 actioncable/lib/action_cable/engine.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'actioncable/lib')

diff --git a/actioncable/lib/action_cable/engine.rb b/actioncable/lib/action_cable/engine.rb
index 96176e0014..34f9952c71 100644
--- a/actioncable/lib/action_cable/engine.rb
+++ b/actioncable/lib/action_cable/engine.rb
@@ -22,7 +22,7 @@ module ActionCable
 
     initializer "action_cable.set_configs" do |app|
       options = app.config.action_cable
-      options.allowed_request_origins ||= "http://localhost:3000" if ::Rails.env.development?
+      options.allowed_request_origins ||= /https?:\/\/localhost:\d+/ if ::Rails.env.development?
 
       app.paths.add "config/cable", with: "config/cable.yml"
 
-- 
cgit v1.2.3