-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Flash keys are automatically converted to symbols. However symbols are not supported by JSON session cookies.
require 'sinatra/base'
require 'rack/flash'
class Server < Sinatra::Application
configure do
use Rack::Session::Cookie, coder: Rack::Session::Cookie::Base64::JSON.new
use Rack::Flash
end
get '/' do
flash['foo'] = 'bar'
end
end
Server.run!Running this sample code produces the error:
Rack::Utils::OkJson::Error at /
Hash key is not a string: :foo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels