mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 03:15:31 -04:00
Use base URL in cookies path
This commit is contained in:
parent
dd01e632a2
commit
4371c7877d
@ -25,6 +25,7 @@ class MainRouter < Router
|
||||
token = @context.storage.verify_user(username, password).not_nil!
|
||||
|
||||
cookie = HTTP::Cookie.new "token", token
|
||||
cookie.path = Config.current.base_url
|
||||
cookie.expires = Time.local.shift years: 1
|
||||
env.response.cookies << cookie
|
||||
redirect env, "/"
|
||||
|
Loading…
x
Reference in New Issue
Block a user