feat: support full path regex annotation (#286)

Signed-off-by: charlie <qianglin98@qq.com>
This commit is contained in:
Qianglin Li
2023-06-02 18:56:22 +08:00
committed by GitHub
parent b23fae7a12
commit 80d6ecfddb
11 changed files with 215 additions and 23 deletions

View File

@@ -76,7 +76,15 @@ func (i *Ingress) NeedRegexMatch() bool {
return false
}
return i.Rewrite.RewriteTarget != "" || i.Rewrite.UseRegex
return i.Rewrite.RewriteTarget != "" || i.IsPrefixRegexMatch() || i.IsFullPathRegexMatch()
}
func (i *Ingress) IsPrefixRegexMatch() bool {
return i.Rewrite.UseRegex
}
func (i *Ingress) IsFullPathRegexMatch() bool {
return i.Rewrite.FullPathRegex
}
func (i *Ingress) IsCanary() bool {