diff options
author | defanor <defanor@uberspace.net> | 2019-02-03 22:57:11 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2019-02-03 22:57:11 +0300 |
commit | d032cdc98f1c05306cdab9cff41362db2e6bfa06 (patch) | |
tree | 8c82e3169f9b89764549932b6c837e98cd8c5714 /Main.hs | |
parent | 83a90895a5b6f1267ad272bfe23a6b604068d3c0 (diff) |
Replace wai-cli with wai-handler-fastcgi
Another step towards making pgxhtml more lightweight,
dependencies-wise.
Diffstat (limited to 'Main.hs')
-rw-r--r-- | Main.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -49,7 +49,7 @@ import Data.Text.Encoding (encodeUtf8) import Network.Wai.Middleware.HttpAuth (extractBasicAuth) import Network.HTTP.Types.Header (hWWWAuthenticate) import Network.Wai.Middleware.Timeout (timeout) -import Network.Wai.Cli (defWaiMain) +import Network.Wai.Handler.FastCGI (run) import Control.Monad (join) import Control.Arrow ((***)) import Control.Exception (bracket, finally, catches, Handler(..)) @@ -250,7 +250,7 @@ main = do conf <- decodeEnv case conf of Left err -> putStrLn err - Right conf' -> defWaiMain + Right conf' -> run $ timeout (connectionTimeout conf') $ \req respond -> case ("authorised" `elem` pathInfo req, extractBasicAuth =<< lookup hAuthorization (requestHeaders req)) of |