How config action cable on rails app with multiple domains?

25 Views Asked by At

I have one rails 6 app with many domain connected on.

How can I do to configure action cable to working for each domain ?

for config.action_cable.allowed_request_origins I can loop on list domains, but how config config.action_cable.url ?

  config.action_cable.url = "wss://__ONLY_ONE_DOMAIN_HERE_:8000/cable"
  config.action_cable.allowed_request_origins = Utils::APP_DOMAINS.map { |domain| %r{https://#{domain}} }

any idea to do this good ?

0

There are 0 best solutions below