2017-04-13 31 views

回答

5

Yesod documentation表示makeSessionBackend默认“使用clientsession 2小时超时”,并且“返回Nothing禁用会话”。因此,解决方案是覆盖该方法并返回Nothing

instance Yesod App where 
    makeSessionBackend _ = return Nothing 
0

评论或从您的Foundation.hs文件删除此代码:

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

而且做stack build