Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSourceIP ¶
GetSourceIP retrieves the IP from the request headers and falls back to r.RemoteAddr when necessary.
func GetSourceIPFromHeaders ¶
GetSourceIPFromHeaders retrieves the IP from the X-Forwarded-For, X-Real-IP and RFC7239 Forwarded headers (in that order)
func GetSourceScheme ¶
GetSourceScheme retrieves the scheme from the X-Forwarded-Proto and RFC7239 Forwarded headers (in that order).
Types ¶
type Forwarder ¶
type Forwarder struct { RoundTripper http.RoundTripper PassHost bool Logger func(error) ErrorHandler func(http.ResponseWriter, *http.Request, error) // contains filtered or unexported fields }
Forwarder forwards all incoming HTTP requests to configured transport.
func NewForwarder ¶
NewForwarder creates an instance of Forwarder based on the provided list of configuration options
Click to show internal directories.
Click to hide internal directories.