diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-16 20:03:34 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-16 20:03:34 +0100 |
commit | 08759871bcc3dc3b461650232747e58653535cdb (patch) | |
tree | 67834a75bbe5399f94a482880a23e0239af37a47 /Foundation.hs | |
parent | adf379f414ebd6f06cfe49dc481b220c7f141ba1 (diff) | |
download | bar-08759871bcc3dc3b461650232747e58653535cdb.tar bar-08759871bcc3dc3b461650232747e58653535cdb.tar.gz bar-08759871bcc3dc3b461650232747e58653535cdb.tar.bz2 bar-08759871bcc3dc3b461650232747e58653535cdb.tar.xz bar-08759871bcc3dc3b461650232747e58653535cdb.zip |
Approot setting
Diffstat (limited to 'Foundation.hs')
-rw-r--r-- | Foundation.hs | 5 |
1 files changed, 4 insertions, 1 deletions
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) | |||
52 | -- Please see the documentation for the Yesod typeclass. There are a number | 52 | -- Please see the documentation for the Yesod typeclass. There are a number |
53 | -- of settings which can be configured by overriding methods here. | 53 | -- of settings which can be configured by overriding methods here. |
54 | instance Yesod App where | 54 | instance Yesod App where |
55 | approot = ApprootRequest $ \_ req -> maybe "" (TE.decodeUtf8With TEE.lenientDecode) $ Map.lookup "AppRoot" (Map.fromList $ requestHeaders req) | 55 | approot = ApprootRequest $ \app req -> |
56 | case appRoot $ appSettings app of | ||
57 | Nothing -> getApprootText guessApproot app req | ||
58 | Just root -> root | ||
56 | 59 | ||
57 | -- Store session data on the client in encrypted cookies, | 60 | -- Store session data on the client in encrypted cookies, |
58 | -- default session idle timeout is 120 minutes | 61 | -- default session idle timeout is 120 minutes |