2017-04-13 36 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