0

I have my development server working at localhost:3000 and my production environment working ok at localhost:8001, both on the same machine.

When I trigger any cable event in the development server, it impact on production environment too.

Which is the best way to config ActionCable for support different environments and prevent cross messages?

Cœur
  • 37,241
  • 25
  • 195
  • 267
cmramseyer
  • 447
  • 2
  • 7

1 Answers1

0

I have found a solution.

My cable.yml file was:

development:
  adapter: redis
  url: redis://127.0.0.1:6379

test:
  adapter: async

production:
  adapter: redis
  url: redis://127.0.0.1:6379

So I change it to

development:
  adapter: async

test:
  adapter: async

production:
  adapter: redis
  url: redis://127.0.0.1:6379
cmramseyer
  • 447
  • 2
  • 7