mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-05 04:15:35 -04:00
Set login cookie expiration date
This commit is contained in:
parent
79aa816ca8
commit
46dfc2f712
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user