Use http-only cookie for session

This commit is contained in:
Rayner De Los Santos F 2016-08-02 23:41:45 -04:00 committed by GitHub
parent e5a9035a61
commit 0b92a7fd6c

View file

@ -73,7 +73,7 @@ module Kemal
id = SecureRandom.hex id = SecureRandom.hex
end end
ctx.response.cookies[NAME] = id ctx.response.cookies << HTTP::Cookie.new(name: NAME, value: id, http_only: true)
@id = id @id = id
end end