forked from ncr/rack-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
jpawlyn/rack-proxy
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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.
About
A request/response rewriting HTTP proxy. A Rack app.
Resources
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Ruby 100.0%