Documentation
¶
Overview ¶
Package forwarded provides tools to deal with proxy related HTTP Headers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsForwarded ¶
IsForwarded returns true if a request contains any x-forwarded header.
func ParseXForwardedFor ¶
ParseXForwardedFor returns an iterator of all valid IP addresses found in X-Forwarded-For header. It yields IP addresses in reverse order so we can easily find the first mach from the rightmost value.
func ParseXForwardedHost ¶
ParseXForwardedHost returns the (trimmed) value of X-Forwarded-Host header.
func ParseXForwardedProto ¶
ParseXForwardedProto returns the value of X-Forwarded-Proto header. Possible return values are "http", "https" or an empty string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.