Skip to content

Commit

Permalink
added csrf middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
agreif committed Jul 15, 2016
1 parent 5db5ff6 commit 6cab48d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hashdb-auth/src/Foundation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ instance Yesod App where
-- Some users may also want to add the defaultCsrfMiddleware, which:
-- a) Sets a cookie with a CSRF token in it.
-- b) Validates that incoming write requests include that token in either a header or POST parameter.
-- To add it, chain it together with the defaultMiddleware: yesodMiddleware = defaultYesodMiddleware . defaultCsrfMiddleware
-- For details, see the CSRF documentation in the Yesod.Core.Handler module of the yesod-core package.
yesodMiddleware = defaultYesodMiddleware
yesodMiddleware = defaultYesodMiddleware . defaultCsrfMiddleware

defaultLayout widget = do
master <- getYesod
Expand Down

0 comments on commit 6cab48d

Please sign in to comment.