diff --git a/src/Foundation.hs b/src/Foundation.hs index accb7e9..b437a4d 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -69,9 +69,10 @@ instance Yesod App where -- Store session data on the client in encrypted cookies, -- default session idle timeout is 120 minutes - makeSessionBackend _ = Just <$> defaultClientSessionBackend - 120 -- timeout in minutes - "config/client_session_key.aes" + makeSessionBackend _ = + -- sslOnlySessions $ + Just <$> + defaultClientSessionBackend 120 "config/client_session_key.aes" -- Yesod Middleware allows you to run code before and after each handler function. -- The defaultYesodMiddleware adds the response header "Vary: Accept, Accept-Language" and performs authorization checks. @@ -79,7 +80,10 @@ instance Yesod App where -- 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. -- For details, see the CSRF documentation in the Yesod.Core.Handler module of the yesod-core package. - yesodMiddleware = defaultCsrfMiddleware . defaultYesodMiddleware + yesodMiddleware = + defaultCsrfMiddleware . + -- sslOnlyMiddleware 120 . + defaultYesodMiddleware defaultLayout widget = do master <- getYesod diff --git a/templates/default-layout-wrapper.hamlet b/templates/default-layout-wrapper.hamlet index 46ccae9..07ec4c9 100644 --- a/templates/default-layout-wrapper.hamlet +++ b/templates/default-layout-wrapper.hamlet @@ -1,10 +1,6 @@ $newline never -\ -\ -\ -\ -\ - + + @@ -16,9 +12,6 @@ $newline never ^{pageHead pc} - \