abhsss96
abhsss96

Reputation: 353

Rails 5 Securing Action Cable with redis

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.

Upvotes: 1

Views: 2744

Answers (2)

Evmorov
Evmorov

Reputation: 1229

production:
  url: redis://:{redis_auth}@{redis_host}:{redis_port}/1

Notice ':' before {redis_auth}.

Upvotes: 6

ellimist
ellimist

Reputation: 626

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

Upvotes: 5

Related Questions