Rails 5 Securing Action Cable with redis

2.6k views Asked by At

What can I do to secure socket connection in rails 5 with redis and action Cable?

What configuration we can add in

config/redis.rb

to add password authentication in Redis.

2

There are 2 answers

0
ellimist On BEST ANSWER

I believe these are the only options exposed for now:

development: &development
  :url: redis://localhost:6379
  :host: localhost
  :port: 6379
  :timeout: 1
  :inline: true
test: *development
production: &production
  :url: redis://{redis_host}:{redis_port}/
  :host: {redis_host}
  :port: {redis_port}
  :password: {redis_password}
  :inline: true
  :timeout: 1
5
Evmorov On
production:
  url: redis://:{redis_auth}@{redis_host}:{redis_port}/1

Notice ':' before {redis_auth}.