on master help sign in
Minor ssRedirectToIndex fixes
3fa4f76Michael Snoyman
wai-app-static/Network/Wai/Application/Static.hs+1
@@ -16,6 +16,7 @@ module Network.Wai.Application.Static
16 , ssListing
16 , ssListing
17 , ssIndices
17 , ssIndices
18 , ssMaxAge
18 , ssMaxAge
19+ , ssRedirectToIndex
19 -- * Generic, non-WAI code
20 -- * Generic, non-WAI code
20 -- ** Mime types
21 -- ** Mime types
21 , MimeType
22 , MimeType
wai-app-static/wai-app-static.cabal+1−1
@@ -1,5 +1,5 @@
1name: wai-app-static
1name: wai-app-static
2−version: 1.1.1.1
2+version: 1.1.2
3license: BSD3
3license: BSD3
4license-file: LICENSE
4license-file: LICENSE
5author: Michael Snoyman <michael@snoyman.com>
5author: Michael Snoyman <michael@snoyman.com>
warp-static/warp-static.cabal+1−1
@@ -16,7 +16,7 @@ Executable warp
16 Main-is: warp.hs
16 Main-is: warp.hs
17 Build-depends: base >= 4 && < 5
17 Build-depends: base >= 4 && < 5
18 , warp >= 1.1 && < 1.2
18 , warp >= 1.1 && < 1.2
19− , wai-app-static >= 1.1 && < 1.2
19+ , wai-app-static >= 1.1.2 && < 1.2
20 , wai-extra >= 1.1 && < 1.2
20 , wai-extra >= 1.1 && < 1.2
21 , cmdargs >= 0.6.7
21 , cmdargs >= 0.6.7
22 , directory >= 1.0
22 , directory >= 1.0
warp-static/warp.hs+2−1
@@ -4,6 +4,7 @@ import Network.Wai.Application.Static
4 , defaultMimeTypes, mimeTypeByExt
4 , defaultMimeTypes, mimeTypeByExt
5 , defaultFileServerSettings, fileSystemLookup
5 , defaultFileServerSettings, fileSystemLookup
6 , fileName, toFilePath
6 , fileName, toFilePath
7+ , ssRedirectToIndex
7 )
8 )
8import Network.Wai.Handler.Warp
9import Network.Wai.Handler.Warp
9 ( runSettings, defaultSettings, settingsHost, settingsPort
10 ( runSettings, defaultSettings, settingsHost, settingsPort
@@ -52,7 +53,7 @@ main = do
52 } $ middle $ staticApp defaultFileServerSettings
53 } $ middle $ staticApp defaultFileServerSettings
53 { ssFolder = fileSystemLookup $ toFilePath docroot
54 { ssFolder = fileSystemLookup $ toFilePath docroot
54 , ssIndices = if noindex then [] else map pack index
55 , ssIndices = if noindex then [] else map pack index
55− , ssRedirectToIndex = false
56+ , ssRedirectToIndex = False
56 , ssListing = Just defaultListing
57 , ssListing = Just defaultListing
57 , ssGetMimeType = return . mimeTypeByExt mimeMap defaultMimeType . fileName
58 , ssGetMimeType = return . mimeTypeByExt mimeMap defaultMimeType . fileName
58 }
59 }