直接看示例

示例

类型路径请求路径匹配与否?
Prefix/(所有路径)
Exact/foo/foo
Exact/foo/bar
Exact/foo/foo/
Exact/foo//foo
Prefix/foo/foo/foo/
Prefix/foo//foo/foo/
Prefix/aaa/bb/aaa/bbb
Prefix/aaa/bbb/aaa/bbb
Prefix/aaa/bbb//aaa/bbb是,忽略尾部斜线
Prefix/aaa/bbb/aaa/bbb/是,匹配尾部斜线
Prefix/aaa/bbb/aaa/bbb/ccc是,匹配子路径
Prefix/aaa/bbb/aaa/bbbxyz否,字符串前缀不匹配
Prefix//aaa/aaa/ccc是,匹配 /aaa 前缀
Prefix//aaa/aaa/bbb/aaa/bbb是,匹配 /aaa/bbb 前缀
Prefix//aaa/aaa/bbb/ccc是,匹配 / 前缀
Prefix/aaa/ccc否,使用默认后端
Mixed/foo (Prefix), /foo (Exact)/foo是,优选 Exact 类型

Examples

KindPath(s)Request path(s)Matches?
Prefix/(all paths)Yes
Exact/foo/fooYes
Exact/foo/barNo
Exact/foo/foo/No
Exact/foo//fooNo
Prefix/foo/foo/foo/Yes
Prefix/foo//foo/foo/Yes
Prefix/aaa/bb/aaa/bbbNo
Prefix/aaa/bbb/aaa/bbbYes
Prefix/aaa/bbb//aaa/bbbYes, ignores trailing slash
Prefix/aaa/bbb/aaa/bbb/Yes, matches trailing slash
Prefix/aaa/bbb/aaa/bbb/cccYes, matches subpath
Prefix/aaa/bbb/aaa/bbbxyzNo, does not match string prefix
Prefix//aaa/aaa/cccYes, matches /aaa prefix
Prefix//aaa/aaa/bbb/aaa/bbbYes, matches /aaa/bbb prefix
Prefix//aaa/aaa/bbb/cccYes, matches / prefix
Prefix/aaa/cccNo, uses default backend
Mixed/foo (Prefix), /foo (Exact)/fooYes, prefers Exact