mirror of
https://github.com/alibaba/higress.git
synced 2026-06-06 11:17:29 +08:00
[frontend-gray] 微前端灰度 场景,支持 IncludePathPrefixes字段 (#1666)
This commit is contained in:
@@ -64,6 +64,7 @@ type GrayConfig struct {
|
||||
BackendGrayTag string
|
||||
Injection *Injection
|
||||
SkippedPathPrefixes []string
|
||||
IncludePathPrefixes []string
|
||||
SkippedByHeaders map[string]string
|
||||
}
|
||||
|
||||
@@ -97,6 +98,7 @@ func JsonToGrayConfig(json gjson.Result, grayConfig *GrayConfig) {
|
||||
grayConfig.Html = json.Get("html").String()
|
||||
grayConfig.SkippedPathPrefixes = convertToStringList(json.Get("skippedPathPrefixes").Array())
|
||||
grayConfig.SkippedByHeaders = convertToStringMap(json.Get("skippedByHeaders"))
|
||||
grayConfig.IncludePathPrefixes = convertToStringList(json.Get("includePathPrefixes").Array())
|
||||
|
||||
if grayConfig.UserStickyMaxAge == "" {
|
||||
// 默认值2天
|
||||
|
||||
Reference in New Issue
Block a user