Skip to content

Instantly share code, notes, and snippets.

@slant
Created January 10, 2013 20:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slant/4505578 to your computer and use it in GitHub Desktop.
Save slant/4505578 to your computer and use it in GitHub Desktop.
Add this in `/config/initializers/redis_store.rb` to get RedisStore's sessions working with `domain: :all`
require 'action_dispatch/middleware/session/redis_store'
ActionDispatch::Session::RedisStore.class_eval do
def set_cookie(env, session_id, cookie)
request = ActionDispatch::Request.new(env)
request.cookie_jar[key] = cookie
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment