Remove approot-guessing support, since it should always be configured in the app settings

This commit is contained in:
Danielle McLean 2017-10-05 09:01:35 +11:00
parent d32b698545
commit 1c5939d863
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -64,10 +64,7 @@ type Form x = Html -> MForm (HandlerT App IO) (FormResult x, Widget)
instance Yesod App where
-- Controls the base of generated URLs. For more information on modifying,
-- see: https://github.com/yesodweb/yesod/wiki/Overriding-approot
approot = ApprootRequest $ \app req ->
case appRoot $ appSettings app of
Nothing -> getApprootText guessApproot app req
Just root -> root
approot = ApprootMaster $ fromMaybe "localhost" . appRoot . appSettings
-- Store session data on the client in encrypted cookies,
-- default session idle timeout is 120 minutes