Popularity
1.9
Growing
Activity
1.6
-
2
0
2
Monthly Downloads: 49
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Latest version: v0.1.1.0
wai-middleware-delegate alternatives and similar packages
Based on the "wai" category.
Alternatively, view wai-middleware-delegate alternatives based on common mentions on social networks and blogs.
-
wai-middleware-static
WAI middleware that intercepts requests to static files and serves them if they exist. -
wai-cli
DISCONTINUED. Command line runner for Wai apps (using Warp) with TLS, CGI, socket activation & graceful shutdown | now on https://codeberg.org/unrelentingtech/wai-cli -
wai-middleware-static-caching
WAI middleware that intercepts requests to static files and serves them if they exist.
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Promo
www.saashub.com
Do you think we are missing an alternative of wai-middleware-delegate or a related project?
README
wai-middleware-delegate

wai-middleware-delegate is a WAI middleware that allows requests to be handled by a delegate application that proxies requests to another server.
Example
{-# LANGUAGE OverloadedStrings #-}
import Data.Default (Default (..))
import Network.HTTP.Client.TLS (newTlsManager)
import Network.HTTP.Types (status500)
import Network.Wai
import Network.Wai.Handler.Warp (run)
import Network.Wai.Middleware.Delegate (ProxySettings (..),
delegateToProxy)
sampleSettings :: ProxySettings
sampleSettings = def { proxyHost = "httpbin.org" }
-- | Create an application that proxies every request to httpbin.org
httpBinDelegate :: ProxySettings -> IO Application
httpBinDelegate s = do
-- delegate everything!
let takeItAll = const True
dummyApp _ respond = respond $ responseLBS status500 [] "I should have been proxied"
manager <- newTlsManager
return $ delegateToProxy s manager (takeItAll) dummyApp
main :: IO ()
main = httpBinDelegate sampleSettings >>= run 3000
*Note that all licence references and agreements mentioned in the wai-middleware-delegate README section above
are relevant to that project's source code only.