Skip to content

Commit

Permalink
Delete session cookie on logout.
Browse files Browse the repository at this point in the history
Resolves Issue #4, I think.
  • Loading branch information
jgm committed Dec 27, 2008
1 parent d3b2ae7 commit dc4280c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Gitit.hs
Expand Up @@ -960,7 +960,9 @@ logoutUser _ params = do
let key = pSessionKey params
let destination = pDestination params
case key of
Just k -> update $ DelSession k
Just k -> do
update $ DelSession k
addCookie 0 (mkCookie "sid" "") -- make cookie expire immediately, effectively deleting it
Nothing -> return ()
seeOther ("/" ++ substitute " " "%20" destination) $ toResponse $ p << "You have been logged out."

Expand Down

0 comments on commit dc4280c

Please sign in to comment.