packages feed

wai-middleware-crowd 0.1.3 → 0.1.4

raw patch · 3 files changed

+21/−3 lines, 3 files

Files

ChangeLog.md view
@@ -1,3 +1,8 @@+## 0.1.4++* --redirect-to-index command line option+* --add-trailing-slash command line option+ ## 0.1.3  * --require-tls command line option
app/wai-crowd.hs view
@@ -9,7 +9,7 @@                                                  defaultOnExc, waiProxyTo) import           Network.Wai                    (Application) import           Network.Wai.Application.Static (defaultFileServerSettings,-                                                 staticApp)+                                                 staticApp, ssRedirectToIndex, ssAddTrailingSlash) import           Network.Wai.Handler.Warp       (run) import           Network.Wai.Middleware.Crowd import           SimpleOptions@@ -64,11 +64,21 @@  data FileServer = FileServer     { fsRoot :: FilePath+    , fsRedirectToIndex :: Bool+    , fsAddTrailingSlash :: Bool     }  fileServerParser = FileServer     <$> (argument str          (metavar "ROOT-DIR" <> value "."))+    <*> switch+        ( long "redirect-to-index"+       <> help "Redirect to the actual index file, not leaving the URL containing the directory name"+        )+    <*> switch+        ( long "add-trailing-slash"+       <> help "Add a trailing slash to directory names"+        )  data ReverseProxy = ReverseProxy     { rpHost :: String@@ -82,7 +92,10 @@  serviceToApp :: Manager -> Service -> IO Application serviceToApp _ (ServiceFiles FileServer {..}) =-    return $ staticApp $ defaultFileServerSettings $ fromString fsRoot+    return $ staticApp (defaultFileServerSettings $ fromString fsRoot)+        { ssRedirectToIndex = fsRedirectToIndex+        , ssAddTrailingSlash = fsAddTrailingSlash+        } serviceToApp manager (ServiceProxy (ReverseProxy host port)) =     return $ waiProxyTo         (const $ return $ WPRProxyDest $ ProxyDest (fromString host) port)
wai-middleware-crowd.cabal view
@@ -1,5 +1,5 @@ name:                wai-middleware-crowd-version:             0.1.3+version:             0.1.4 synopsis:            Middleware and utilities for using Atlassian Crowd authentication description:         See README license:             MIT