From 08759871bcc3dc3b461650232747e58653535cdb Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 16 Mar 2017 20:03:34 +0100 Subject: Approot setting --- Foundation.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Foundation.hs') diff --git a/Foundation.hs b/Foundation.hs index d7425d5..27082fc 100644 --- a/Foundation.hs +++ b/Foundation.hs @@ -52,7 +52,10 @@ type Form x = Html -> MForm (HandlerT App IO) (FormResult x, Widget) -- Please see the documentation for the Yesod typeclass. There are a number -- of settings which can be configured by overriding methods here. instance Yesod App where - approot = ApprootRequest $ \_ req -> maybe "" (TE.decodeUtf8With TEE.lenientDecode) $ Map.lookup "AppRoot" (Map.fromList $ requestHeaders req) + approot = ApprootRequest $ \app req -> + case appRoot $ appSettings app of + Nothing -> getApprootText guessApproot app req + Just root -> root -- Store session data on the client in encrypted cookies, -- default session idle timeout is 120 minutes -- cgit v1.2.3