A caching reverse proxy

Clone this repo:

Branches

  1. 57e4aba Add support for caching POST request with body by Tristan Cacqueray · 1 year, 9 months ago master
  2. eeb7b18 Adapt requests header for remote host by Tristan Cacqueray · 1 year, 10 months ago
  3. 4681da5 Only cache 2xx status code by Tristan Cacqueray · 1 year, 10 months ago
  4. 2365dd5 Add initial implementation by Tristan Cacqueray · 1 year, 10 months ago
  5. fe07053 Initial summon by Tristan Cacqueray · 1 year, 10 months ago

caching-reverse-proxy

Hackage License

A caching reverse proxy to help client development powered by the http-reverse-proxy library.

Example

$ caching-reverse-proxy --path "/srv/bugzilla.redhat.com" --port 8080 --dest-host "bugzilla.redhat.com" --dest-port 443
Listing on port 8080
-- in another shell, run: curl localhost:8080/rest/bug/42042
Serving: Request {requestMethod = "GET", httpVersion = HTTP/1.1, rawPathInfo = "/rest/bug/42042", ... }
Caching response to "/srv/bugzilla.redhat.com/rest/bug/42042.raw"

Subsequent requests may be served directly from the cache.

Contribute

To work on this project you need a Haskell toolchain, for example on fedora:

$ sudo dnf install -y ghc cabal-install && cabal update

Run the cli:

$ cabal run caching-reverse-proxy -- --help