diff --git a/src/routes/main.cr b/src/routes/main.cr index e739d82..7b05fd1 100644 --- a/src/routes/main.cr +++ b/src/routes/main.cr @@ -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, "/"