Skip to content

Commit

Permalink
update caching strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
nieled committed Aug 6, 2022
1 parent 0730d34 commit f151735
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Adapter/HTTP/Web/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ import Network.Wai.Middleware.Static ( CacheContainer
)
, Options(cacheContainer)
, addBase
, defaultOptions
, initCaching
, staticPolicy'
, staticPolicyWithOptions
)
import Web.Scotty.Trans ( ScottyError(..)
, ScottyT
Expand Down Expand Up @@ -69,8 +71,9 @@ routes
-> ScottyT Text m ()
routes cachingStrategy = do
middleware $ gzip $ def { gzipFiles = GzipCompress }
middleware
$ staticPolicy' cachingStrategy (addBase "src/Adapter/HTTP/Web/static")
middleware $ staticPolicyWithOptions
defaultOptions { cacheContainer = cachingStrategy }
(addBase "src/Adapter/HTTP/Web/static")

Auth.routes

Expand Down

0 comments on commit f151735

Please sign in to comment.