我的开发服务器在localhost:3000工作,我的生产环境在localhost:8001工作正常,两者都在同一台机器上。
当我在开发服务器中触发任何有线事件时,它也会影响生产环境。
哪种配置ActionCable以支持不同的环境并阻止交叉消息?
答案 0 :(得分:0)
我找到了解决方案。
我的cable.yml文件是:
development:
adapter: redis
url: redis://127.0.0.1:6379
test:
adapter: async
production:
adapter: redis
url: redis://127.0.0.1:6379
所以我把它改成
development:
adapter: async
test:
adapter: async
production:
adapter: redis
url: redis://127.0.0.1:6379