mirror of
https://github.com/hkalexling/Mango.git
synced 2026-01-25 00:00:36 -05:00
Set login cookie expiration date
This commit is contained in:
@@ -26,6 +26,7 @@ class MainRouter < Router
|
||||
.not_nil!
|
||||
|
||||
cookie = HTTP::Cookie.new "token", token
|
||||
cookie.expires = Time.local.shift years: 1
|
||||
env.response.cookies << cookie
|
||||
env.redirect "/"
|
||||
rescue
|
||||
|
||||
Reference in New Issue
Block a user