Popularity
2.4
Stable
Activity
7.6
Growing
2
2
2
Monthly Downloads: 86
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.
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
Promo
coderabbit.ai
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.