Ask A Question
You’re not receiving notifications from this thread.
Configure Redis Session Store
Derek Dyer asked in Rails • Solved
Seems pretty straight forward however, I am getting an invalid authenticity token error upon form post with my app.
Here's what I have set in config/environments/development.rb:
config.session_store :redis_store, servers: ['redis://localhost:6379/session'], expire_after: 90.minutes, key: "_<app_name>_session", threadsafe: false, secure: true
Here's relevant (IMO) gems in my gemfile:
# Use Redis adapter to run Action Cable in production gem "redis", "~> 4.0" # https://github.com/redis/hiredis-rb gem 'hiredis' # optional # for sessions gem 'redis-actionpack'
The issue was that I had
secure: true set per the documentation. This enforces ssl/https and I was in a local dev env