diff options
author | Daniel Gnoutcheff <gnoutchd@softwarefreedom.org> | 2022-01-25 20:04:10 -0500 |
---|---|---|
committer | Daniel Gnoutcheff <gnoutchd@softwarefreedom.org> | 2022-01-25 20:04:10 -0500 |
commit | 0a3efc56732f79304845a6e6d381c793f38e6c2c (patch) | |
tree | cdd3c1a51c8cca0b0e8dbbb0fa4f860232b0d933 /Foundation.hs | |
parent | a1a17acb326020f1b57f587230cb439e901784df (diff) |
Diffstat (limited to 'Foundation.hs')
-rw-r--r-- | Foundation.hs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Foundation.hs b/Foundation.hs index c3c8cf0..46faef1 100644 --- a/Foundation.hs +++ b/Foundation.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE ViewPatterns #-} + module Foundation where import Prelude @@ -85,12 +87,6 @@ instance Yesod App where $(widgetFile "default-layout") giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") - -- This is done to provide an optimization for serving static files from - -- a separate domain. Please see the staticRoot setting in Settings.hs - urlRenderOverride y (StaticR s) = - Just $ uncurry (joinPath y (Settings.staticRoot $ settings y)) $ renderRoute s - urlRenderOverride _ _ = Nothing - -- Routes not requiring authenitcation. isAuthorized FaviconR _ = return Authorized isAuthorized RobotsR _ = return Authorized @@ -114,8 +110,8 @@ instance Yesod App where -- What messages should be logged. The following includes all messages when -- in development, and warnings and errors in production. - shouldLog _ _source level = - development || level == LevelWarn || level == LevelError + shouldLogIO _ _source level = return $ + development || level == LevelWarn || level == LevelError makeLogger = return . appLogger |