Save 36% for Black Friday! Save 36% on GoRails for Black Friday! Learn more
Derek Dyer
Joined
850 Experience
1 Lesson Completed
1 Question Solved
Activity
Posted in Configure Redis Session Store
The issue was that I had secure: true
set per the documentation. This enforces ssl/https and I was in a local dev env
Posted in Configure Redis Session Store
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'