Documentation
¶
Index ¶
Constants ¶
const ( XForwardedProto = "X-Forwarded-Proto" XForwardedHost = "X-Forwarded-Host" XForwardedURI = "X-Forwarded-Uri" )
Variables ¶
This section is empty.
Functions ¶
func CanTrustForwardedHeaders ¶ added in v7.15.2
CanTrustForwardedHeaders determines if forwarded headers should be processed based on the RequestScope and the direct caller's address.
func GetRequestHost ¶
GetRequestHost returns the request host header or X-Forwarded-Host if present and the request came from a trusted reverse proxy.
func GetRequestPath ¶ added in v7.11.0
GetRequestPath returns the request URI or X-Forwarded-Uri if present and the request came from a trusted reverse proxy but always strips the query parameters and fragment suffixes and only returns the pure path.
func GetRequestProto ¶
GetRequestProto returns the request scheme or X-Forwarded-Proto if present and the request came from a trusted reverse proxy.
func GetRequestURI ¶
GetRequestURI return the request URI or X-Forwarded-Uri if present and the request came from a trusted reverse proxy.
func IsForwardedRequest ¶ added in v7.2.0
Types ¶
This section is empty.