{-# LANGUAGE OverloadedStrings #-}
module Network.Wai.Application.Classic.Def where
import Network.Wai.Application.Classic.Path
import Network.Wai.Application.Classic.Types
defaultClassicAppSpec :: ClassicAppSpec
defaultClassicAppSpec :: ClassicAppSpec
defaultClassicAppSpec = ClassicAppSpec {
softwareName :: Path
softwareName = Path
"Classic"
, statusFileDir :: Path
statusFileDir = Path
"/usr/local/share/html/status/"
}
defaultFileAppSpec :: FileAppSpec
defaultFileAppSpec :: FileAppSpec
defaultFileAppSpec = FileAppSpec {
indexFile :: Path
indexFile = Path
"index.html"
, isHTML :: Path -> Bool
isHTML = Path -> Bool
defaultIsHTml
}
defaultIsHTml :: Path -> Bool
defaultIsHTml :: Path -> Bool
defaultIsHTml Path
file = Path
".html" Path -> Path -> Bool
`isSuffixOf` Path
file Bool -> Bool -> Bool
|| Path
".htm" Path -> Path -> Bool
`isSuffixOf` Path
file
defaultCgiAppSpec :: CgiAppSpec
defaultCgiAppSpec :: CgiAppSpec
defaultCgiAppSpec = CgiAppSpec {
indexCgi :: Path
indexCgi = Path
"index.cgi"
}