Documentation
¶
Overview ¶
Package path supports path based predicates that work on the request object similar to all non path based predicates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUrlPathPrefix ¶
func NewUrlPathPrefix() routing.PredicateSpec
NewUrlPathPrefix creates a predicate specification whose instances match requests where the decoded path (URL.Path) starts with the given prefix.
Unlike the builtin Path and PathSubtree predicates, UrlPathPrefix belongs to the second evaluation group (like PathRegexp) and does not participate in the path tree. It can therefore match paths containing double slashes that are preserved in URL.Path since Skipper does not use http.ServeMux. For paths with percent-encoded characters such as %2F, use UrlRawPathPrefix.
func NewUrlPathRegexp ¶
func NewUrlPathRegexp() routing.PredicateSpec
NewUrlPathRegexp creates a predicate specification whose instances match requests where the decoded path (URL.Path) matches the given regular expression.
Unlike the builtin PathRegexp, this is a plugin predicate and can be combined freely with PathRegexp in the same route. Like PathRegexp it belongs to the second evaluation group, not the path tree. Double slashes are preserved in URL.Path since Skipper does not use http.ServeMux. For percent-encoded characters such as %2F, use UrlRawPathRegexp.
func NewUrlRawPathPrefix ¶
func NewUrlRawPathPrefix() routing.PredicateSpec
NewUrlRawPathPrefix creates a predicate specification whose instances match requests where the raw (URL-encoded) path starts with the given prefix.
It reads URL.RawPath when set, falling back to URL.Path. Use this when the path may contain percent-encoded reserved characters such as %2F (encoded slash) that Go's HTTP server decodes in URL.Path.
func NewUrlRawPathRegexp ¶
func NewUrlRawPathRegexp() routing.PredicateSpec
NewUrlRawPathRegexp creates a predicate specification whose instances match requests where the raw (URL-encoded) path matches the given regular expression.
It reads URL.RawPath when set, falling back to URL.Path. Use this when you need regexp matching on paths containing percent-encoded reserved characters such as %2F that Go's HTTP server decodes in URL.Path.
Types ¶
This section is empty.