Network.Wai.Middleware.StripHeaders

wai-extra-3.1.17: Provides some basic WAI handlers and middleware.

Safe Haskell | None
Language | Haskell2010

Network.Wai.Middleware.StripHeaders

Synopsis

- stripHeader :: ByteString -> Response -> Response
- stripHeaders :: [ByteString] -> Response -> Response
- stripHeaderIf :: ByteString -> (Request -> Bool) -> Middleware
- stripHeadersIf :: [ByteString] -> (Request -> Bool) -> Middleware

# Documentation

stripHeader :: ByteString -> Response -> Response #

stripHeaders :: [ByteString] -> Response -> Response #

stripHeaderIf :: ByteString -> (Request -> Bool) -> Middleware #

If the request satisifes the provided predicate, strip headers matching the provided header name.

Since 3.0.8

stripHeadersIf :: [ByteString] -> (Request -> Bool) -> Middleware #

If the request satisifes the provided predicate, strip all headers whose header name is in the list of provided header names.

Since 3.0.8