Skip to content

Instantly share code, notes, and snippets.

@onliniak
Created October 4, 2019 08:06
Show Gist options
  • Save onliniak/42fadce6592ffe26f3d4d0b0f993da9c to your computer and use it in GitHub Desktop.
Save onliniak/42fadce6592ffe26f3d4d0b0f993da9c to your computer and use it in GitHub Desktop.
Rack session
session[:key] = 'value'
request.session['key']
# 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