mirror of
https://github.com/snoyberg/keter.git
synced 2024-12-15 01:23:09 +03:00
Update Middleware.hs
uncomment AddHeaders
This commit is contained in:
parent
276b93a36a
commit
2f479a768d
@ -16,10 +16,9 @@ import Network.Wai.Middleware.AcceptOverride (acceptOverride)
|
||||
import Network.Wai.Middleware.Autohead (autohead)
|
||||
import Network.Wai.Middleware.Jsonp (jsonp)
|
||||
import Network.Wai.Middleware.Local (local)
|
||||
-- import Network.Wai.Middleware.AddHeaders (addHeaders)
|
||||
import Network.Wai.Middleware.AddHeaders (addHeaders)
|
||||
import Network.Wai.Middleware.MethodOverride (methodOverride)
|
||||
import Network.Wai.Middleware.MethodOverridePost (methodOverridePost)
|
||||
|
||||
import Network.Wai.Middleware.HttpAuth (basicAuth)
|
||||
|
||||
import Data.ByteString.Lazy as L (ByteString)
|
||||
@ -94,9 +93,7 @@ toMiddleware (Local s c ) = local ( responseLBS (toEnum s) [] c )
|
||||
toMiddleware MethodOverride = methodOverride
|
||||
toMiddleware MethodOverridePost = methodOverridePost
|
||||
toMiddleware (BasicAuth realm cred) = basicAuth (\u p -> return $ maybe False (==p) $ lookup u cred ) (fromString realm)
|
||||
-- XXX: fix it once we have it
|
||||
toMiddleware (AddHeaders headers) = id -- fix it once we have it
|
||||
-- addHeaders headers
|
||||
toMiddleware (AddHeaders headers) = addHeaders headers
|
||||
|
||||
-- composeMiddleware :
|
||||
composeMiddleware :: [Middleware] -> Middleware
|
||||
|
Loading…
Reference in New Issue
Block a user