Prevent Yesod from being generated from client_session_key.aes file

When I run the Yesod app, it generates a file called client_session_key.aes

. I don't need this because I am using session authentication. Can Yesod be stopped by creating this file?

+3


source to share


2 answers


Yesod documentation says that the makeSessionBackend

default method "uses client communication with a 2 hour timeout" and that "return Nothing

disconnects sessions". So the solution is to override this method and return Nothing

:



instance Yesod App where
    makeSessionBackend _ = return Nothing

      

+5


source


Comment or remove this code from the file Foundation.hs

:

makeSessionBackend _ = Just <$> defaultClientSessionBackend
    120    -- timeout in minutes
    "config/client_session_key.aes"

      



And do it stack build

.

0


source







All Articles