Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoteHost ¶
RemoteHost returns the remote address of the client. When the 'X-Forwarded-For' header is set, then it is used instead. This is how most often proxies behave. Wikipedia shows the format https://en.wikipedia.org/wiki/X-Forwarded-For#Format
Example:
X-Forwarded-For: client, proxy1, proxy2
func RemoteHostFromLast ¶ added in v0.9.152
RemoteHostFromLast returns the remote address of the client. When the 'X-Forwarded-For' header is set, then it is used instead. This is known to be true for AWS Application LoadBalancer. AWS docs https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/x-forwarded-headers.html
Example:
X-Forwarded-For: ip-address-1, ip-address-2, client-ip-address
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.