The http-reverse-proxy package

[Tags: bsd3, library]

Provides a simple means of reverse-proxying HTTP requests. The raw approach uses the same technique as leveraged by keter, whereas the WAI approach performs full request/response parsing via WAI and http-conduit.


[Skip to ReadMe]

Properties

Versions0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4, 0.1.0.5, 0.1.0.6, 0.1.0.7, 0.1.1, 0.1.1.1, 0.1.1.2, 0.1.1.3, 0.1.1.4, 0.1.1.5, 0.1.1.6, 0.2.0, 0.2.1, 0.2.1.1, 0.3.0, 0.3.0.1, 0.3.1, 0.3.1.1, 0.3.1.2, 0.3.1.3, 0.3.1.4, 0.3.1.5, 0.3.1.6, 0.3.1.7, 0.3.1.8, 0.4.0, 0.4.0.1, 0.4.1.2, 0.4.1.3, 0.4.2
Change logChangeLog.md
Dependenciesasync, base (>=4.6 && <5), blaze-builder (>=0.3), bytestring (>=0.9), case-insensitive (>=0.4), conduit (>=1.1), conduit-extra, containers, data-default-class, http-client (>=0.3), http-types (>=0.6), lifted-base (>=0.1), monad-control (>=0.3), network, resourcet, streaming-commons, text (>=0.11), transformers, wai (>=3.0), wai-logger, word8 (>=0.0) [details]
LicenseBSD3
AuthorMichael Snoyman
Maintainermichael@fpcomplete.com
CategoryWeb
Home pagehttps://github.com/fpco/http-reverse-proxy
Source repositoryhead: git clone git://github.com/fpco/http-reverse-proxy.git
UploadedTue May 19 07:14:12 UTC 2015 by MichaelSnoyman
UpdatedThu Jun 25 22:08:05 UTC 2015 by AdamBergmark to revision 1
DistributionsDebian:0.4.2, FreeBSD:0.4.2, LTSHaskell:0.4.2, NixOS:0.4.2, Stackage:0.4.2
Downloads24428 total (594 in last 30 days)
Votes
0 []
StatusDocs available [build log]
Last success reported on 2015-05-23 [all 1 reports]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for http-reverse-proxy-0.4.2

http-reverse-proxy

Provides a simple means of reverse-proxying HTTP requests. The raw approach uses the same technique as leveraged by keter, whereas the WAI approach performs full request/response parsing via WAI and http-conduit.

Raw example

The following sets up raw reverse proxying from local port 3000 to www.example.com, port 80.

{-# LANGUAGE OverloadedStrings #-}
import Network.HTTP.ReverseProxy
import Data.Conduit.Network

main :: IO ()
main = runTCPServer (serverSettings 3000 "*") $ \appData ->
    rawProxyTo
        (\_headers -> return $ Right $ ProxyDest "www.example.com" 80)
        appData