Created
October 10, 2012 02:45
-
-
Save jgyllen/3862855 to your computer and use it in GitHub Desktop.
Sharing Rails cookie session with a Sinatra app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Rack::Config do |env| | |
env[ActionDispatch::Cookies::TOKEN_KEY] = 'abc123' # Secret token from Rails config | |
end | |
use ActionDispatch::Session::CookieStore, key: '_myapp_session' # Session key from session store options in Rails config | |
run MyApp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment