Skip to content

Commit

Permalink
wai middlewares
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed Jan 13, 2015
1 parent 17056d7 commit 8fa00d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Application.hs
Expand Up @@ -26,6 +26,7 @@ import qualified Data.ByteString.Char8 as BC
--import Data.Monoid
import System.IO (hPutStrLn, stderr)
import Network.Wai.Middleware.Autohead
import Network.Wai.Middleware.Gzip


-- Import all relevant handler modules here.
Expand Down Expand Up @@ -68,8 +69,8 @@ makeApplication conf = do
foundation <- makeUIFoundation conf uiPool
tracker <- makeTrackerApp trackerPool >>= toWaiAppPlain
stats <- statsMiddleware (appEnv conf) trackerPool
ui <- enforceVhost <$> stats <$> autohead <$> etagMiddleware <$>
toWaiApp foundation
ui <- enforceVhost <$> stats <$> gzip def <$> autohead <$> etagMiddleware <$>
toWaiAppPlain foundation
return $ measureDuration $ anyApp [tracker, ui]
where
anyApp [app] =
Expand Down

0 comments on commit 8fa00d8

Please sign in to comment.