package
0.0.0-20180911183212-0f8974794783
Repository: https://github.com/levenlabs/golib.git
Documentation: pkg.go.dev

# Functions

AddXForwardedFor populates the X-Forwarded-For header on dst to convey that src is being proxied by this server.
AddXForwardedForIP populates the X-Forwarded-For header on dst to convey that ip is making the request.
DecodeResponse takes a http.Response from Do() and replaces the body with an uncompressed form.
FilterEncodings adjusts the Accept-Encoding header, if set, so that it only allows at most the given encodings.
NewBufferedResponseWriter returns an initialized BufferedResponseWriter, which will catch writes going to the given ResponseWriter.
RequestIP returns the string form of the original requester's IP address for the given request, taking into account X-Forwarded-For if applicable.
WriteResponse writes the given response into the ResponseWriter.

# Variables

BufferedResponseWriterEncodings is the set of encodings that BufferedResponseWriter supports.

# Structs

BufferedResponseWriter is a wrapper around a real ResponseWriter which actually writes all data to a buffer instead of the ResponseWriter.
ReverseProxyClient is a wrapper around a basic *http.Client which performs requests as a reverse http proxy instead of a normal client.