Created
October 4, 2019 08:06
-
-
Save onliniak/42fadce6592ffe26f3d4d0b0f993da9c to your computer and use it in GitHub Desktop.
Rack session
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
session[:key] = 'value' | |
request.session['key'] |
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
# Start Rack-server | |
use Rack::Session::Cookie, key: 'rack.session', | |
domain: '0.0.0.0', | |
path: '/', | |
expire_after: 2_592_000, | |
secret: Random.new.bytes(32) | |
run App |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment