mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-17 20:17:03 +02:00
docs: clarify alpha upstream path syntax (#3504)
Signed-off-by: nightcityblade <nightcityblade@gmail.com> Co-authored-by: nightcityblade <nightcityblade@gmail.com>
This commit is contained in:
co-authored by
nightcityblade
parent
f7ae0ae81e
commit
d122f0c28e
@@ -62,12 +62,14 @@ type Upstream struct {
|
||||
|
||||
// Path is used to map requests to the upstream server.
|
||||
// The closest match will take precedence and all Paths must be unique.
|
||||
// Path can also take a pattern when used with RewriteTarget.
|
||||
// Path segments can be captured and matched using regular experessions.
|
||||
// Without RewriteTarget, Path follows gorilla/mux route syntax.
|
||||
// Eg:
|
||||
// - `^/foo$`: Match only the explicit path `/foo`
|
||||
// - `^/bar/$`: Match any path prefixed with `/bar/`
|
||||
// - `^/baz/(.*)$`: Match any path prefixed with `/baz` and capture the remaining path for use with RewriteTarget
|
||||
// - `/foo`: Match only the explicit path `/foo`
|
||||
// - `/bar/`: Match any path prefixed with `/bar/`
|
||||
// - `/baz/{path:.*}`: Match any path prefixed with `/baz/`
|
||||
// When RewriteTarget is set, Path is treated as a regular expression.
|
||||
// Eg: `^/baz/(.*)$` matches any path prefixed with `/baz` and captures the
|
||||
// remaining path for use with RewriteTarget.
|
||||
Path string `yaml:"path,omitempty"`
|
||||
|
||||
// RewriteTarget allows users to rewrite the request path before it is sent to
|
||||
|
||||
Reference in New Issue
Block a user