Skip to content

Commit

Permalink
Merge pull request #162 from tolysz/gzip-precompressed
Browse files Browse the repository at this point in the history
Use better gzip default setting
  • Loading branch information
creichert committed Mar 4, 2017
2 parents c9af041 + 51ac057 commit eb2cfff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Keter/Proxy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import Network.Wai.Application.Static (defaultFileServerSettings,
ssListing, staticApp)
import qualified Network.Wai.Handler.Warp as Warp
import qualified Network.Wai.Handler.WarpTLS as WarpTLS
import Network.Wai.Middleware.Gzip (gzip)
import Network.Wai.Middleware.Gzip (gzip, GzipSettings(..), GzipFiles(..))
import Prelude hiding (FilePath, (++))
import WaiAppStatic.Listing (defaultListing)
import qualified Network.TLS as TLS
Expand All @@ -51,7 +51,7 @@ type HostLookup = ByteString -> IO (Maybe (ProxyAction, TLS.Credentials))
reverseProxy :: Bool
-> Int -> Manager -> HostLookup -> ListeningPort -> IO ()
reverseProxy useHeader timeBound manager hostLookup listener =
run $ gzip def $ withClient isSecure useHeader timeBound manager hostLookup
run $ gzip def{gzipFiles = GzipPreCompressed GzipIgnore} $ withClient isSecure useHeader timeBound manager hostLookup
where
warp host port = Warp.setHost host $ Warp.setPort port Warp.defaultSettings
(run, isSecure) =
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ flags:
packages:
- '.'
extra-deps: []
resolver: lts-5.0
resolver: lts-7.19

0 comments on commit eb2cfff

Please sign in to comment.