Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
A request/response rewriting HTTP proxy. A Rack app. Subclass Rack::Proxy and provide your rewrite_env and rewrite_response methods. Example: class Foo < Rack::Proxy def rewrite_env(env) env["HTTP_HOST"] = "example.com" env end def rewrite_response(triplet) status, headers, body = triplet headers["X-Foo"] = "Bar" triplet end end See tests for more examples. WARNING: Doesn't work with fakeweb/webmock. Both libraries monkey-patch net/http code.