Refactor handling of path Prefix and Exact
This commit is contained in:
parent
52726abaee
commit
3f153add00
10 changed files with 316 additions and 71 deletions
|
|
@ -95,7 +95,8 @@ var _ = framework.DescribeAnnotation("rewrite-target use-regex enable-rewrite-lo
|
|||
|
||||
f.WaitForNginxServer(host,
|
||||
func(server string) bool {
|
||||
return strings.Contains(server, `location ~* "^/" {`) && strings.Contains(server, `location ~* "^/.well-known/acme/challenge" {`)
|
||||
return strings.Contains(server, `location ~* "^/" {`) &&
|
||||
strings.Contains(server, `location ~* "^/.well-known/acme/challenge" {`)
|
||||
})
|
||||
|
||||
ginkgo.By("making a second request to the non-rewritten location")
|
||||
|
|
@ -116,7 +117,7 @@ var _ = framework.DescribeAnnotation("rewrite-target use-regex enable-rewrite-lo
|
|||
|
||||
f.WaitForNginxServer(host,
|
||||
func(server string) bool {
|
||||
return strings.Contains(server, "location /foo {")
|
||||
return strings.Contains(server, "location /foo/ {")
|
||||
})
|
||||
|
||||
ginkgo.By(`creating an ingress definition with the use-regex amd rewrite-target annotation`)
|
||||
|
|
@ -129,7 +130,8 @@ var _ = framework.DescribeAnnotation("rewrite-target use-regex enable-rewrite-lo
|
|||
|
||||
f.WaitForNginxServer(host,
|
||||
func(server string) bool {
|
||||
return strings.Contains(server, `location ~* "^/foo" {`) && strings.Contains(server, `location ~* "^/foo.+" {`)
|
||||
return strings.Contains(server, `location ~* "^/foo" {`) &&
|
||||
strings.Contains(server, `location ~* "^/foo.+" {`)
|
||||
})
|
||||
|
||||
ginkgo.By("ensuring '/foo' matches '~* ^/foo'")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue