Documentation ¶
Overview ¶
Package forwarded implements a set of custom predicate to match routes based on the standardized Forwarded header.
https://datatracker.ietf.org/doc/html/rfc7239 https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded
Examples:
// only match requests to "example.com" example1: ForwardedHost("example.com") -> "http://example.org"; // only match requests to http example2: ForwardedProtocol("http") -> "http://example.org"; // only match requests to https example3: ForwardedProtocol("https") -> "http://example.org";
Index ¶
Constants ¶
View Source
const ( // Deprecated, use predicates.ForwardedHostName instead NameHost = predicates.ForwardedHostName // Deprecated, use predicates.ForwardedProtocolName instead NameProto = predicates.ForwardedProtocolName )
Variables ¶
This section is empty.
Functions ¶
func NewForwardedHost ¶
func NewForwardedHost() routing.PredicateSpec
func NewForwardedProto ¶
func NewForwardedProto() routing.PredicateSpec
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.