wai-middleware-delegate-0.1.0.0: WAI middleware that delegates handling of requests.

Copyright(c) Tim Emiola 2018
LicenseC8D3
Maintainertim.emiola@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Network.Wai.Middleware.Delegate

Description

 
Synopsis

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.

Constructors

ProxySettings 

Fields

Instances
Default ProxySettings Source # 
Instance details

Defined in Network.Wai.Middleware.Delegate

Methods

def :: ProxySettings #

type RequestPredicate = Request -> Bool Source #

Type alias for a function that determines if a request should be handled by a delegate.