Top 2.2% dependent packages on proxy.golang.org
Top 2.3% dependent repos on proxy.golang.org
Top 6.7% forks on proxy.golang.org
Top 1.8% docker downloads on proxy.golang.org
proxy.golang.org : github.com/stripe/goproxy
Taken from $GOROOT/src/pkg/net/http/chunked needed to write https responses to client. Package goproxy provides a customizable HTTP proxy, supporting hijacking HTTPS connection. The intent of the proxy, is to be usable with reasonable amount of traffic yet, customizable and programable. The proxy itself is simply an `net/http` handler. Typical usage is Adding a header to each request For printing the content type of all incoming responses note that we used the ProxyCtx context variable here. It contains the request and the response (Req and Resp, Resp is nil if unavailable) of this specific client interaction with the proxy. To print the content type of all responses from a certain url, we'll add a ReqCondition to the OnResponse function: We can write the condition ourselves, conditions can be set on request and on response Caution! If you give a RespCondition to the OnRequest function, you'll get a run time panic! It doesn't make sense to read the response, if you still haven't got it! Finally, we have convenience function to throw a quick response we close the body of the original repsonse, and return a new 403 response with a short message.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/stripe/goproxy
License: BSD-3-Clause
Latest release: over 1 year ago
First release: about 3 years ago
Namespace: github.com/stripe
Dependent packages: 5
Dependent repositories: 5
Stars: 16 on GitHub
Forks: 9 on GitHub
Docker dependents: 3
Docker downloads: 37
See more repository details: repos.ecosyste.ms
Last synced: 2 months ago