Safe Haskell | None |
---|---|
Language | Haskell2010 |
that delegates handling of requests.
- delegateTo: delegates handling of requests matching a predicate to a delegate Application
- delegateToProxy : delegates handling of requests matching a predicate to different host
- simpleProxy: is a simple reverse proxy, based on proxyApp of http-proxy by Erik de Castro Lopo/Michael Snoyman
Copyright : (c) Tim Emiola, 2018 License : C8D3 Maintainer : tim.emiola@gmail.com Stability : experimental
Synopsis
- delegateTo :: Application -> RequestPredicate -> Middleware
- delegateToProxy :: ProxySettings -> Manager -> RequestPredicate -> Middleware
- simpleProxy :: ProxySettings -> Manager -> Application
- data ProxySettings = ProxySettings {}
- type RequestPredicate = Request -> Bool
Documentation
delegateTo :: Application -> RequestPredicate -> Middleware Source #
Create a middleware that handles all requests matching a predicate by delegating to an alternate Application.
delegateToProxy :: ProxySettings -> Manager -> RequestPredicate -> Middleware Source #
Creates a middleware that handles all requests matching a predicate by proxing them to a host specified by ProxySettings.
simpleProxy :: ProxySettings -> Manager -> Application Source #
A Wai Application that acts as a http/https proxy.
data ProxySettings Source #
Settings that configure the proxy endpoint.
ProxySettings | |
|
Instances
Default ProxySettings Source # | |
Defined in Network.Wai.Middleware.Delegate def :: ProxySettings # |
type RequestPredicate = Request -> Bool Source #
Type alias for a function that determines if a request should be handled by a delegate.