mirror of
https://github.com/snoyberg/keter.git
synced 2025-01-05 21:36:40 +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.Autohead (autohead)
|
||||||
import Network.Wai.Middleware.Jsonp (jsonp)
|
import Network.Wai.Middleware.Jsonp (jsonp)
|
||||||
import Network.Wai.Middleware.Local (local)
|
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.MethodOverride (methodOverride)
|
||||||
import Network.Wai.Middleware.MethodOverridePost (methodOverridePost)
|
import Network.Wai.Middleware.MethodOverridePost (methodOverridePost)
|
||||||
|
|
||||||
import Network.Wai.Middleware.HttpAuth (basicAuth)
|
import Network.Wai.Middleware.HttpAuth (basicAuth)
|
||||||
|
|
||||||
import Data.ByteString.Lazy as L (ByteString)
|
import Data.ByteString.Lazy as L (ByteString)
|
||||||
@ -94,9 +93,7 @@ toMiddleware (Local s c ) = local ( responseLBS (toEnum s) [] c )
|
|||||||
toMiddleware MethodOverride = methodOverride
|
toMiddleware MethodOverride = methodOverride
|
||||||
toMiddleware MethodOverridePost = methodOverridePost
|
toMiddleware MethodOverridePost = methodOverridePost
|
||||||
toMiddleware (BasicAuth realm cred) = basicAuth (\u p -> return $ maybe False (==p) $ lookup u cred ) (fromString realm)
|
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) = addHeaders headers
|
||||||
toMiddleware (AddHeaders headers) = id -- fix it once we have it
|
|
||||||
-- addHeaders headers
|
|
||||||
|
|
||||||
-- composeMiddleware :
|
-- composeMiddleware :
|
||||||
composeMiddleware :: [Middleware] -> Middleware
|
composeMiddleware :: [Middleware] -> Middleware
|
||||||
|
Loading…
Reference in New Issue
Block a user