feat: support frontend-gray plugin's envoy.yaml file to host HTML (#1343)

Co-authored-by: Kent Dong <ch3cho@qq.com>
This commit is contained in:
Hazel0928
2024-09-26 22:38:33 +08:00
committed by GitHub
parent 567d7c25f3
commit ea99159d51
5 changed files with 72 additions and 22 deletions

View File

@@ -55,6 +55,7 @@ type GrayConfig struct {
GraySubKey string
Rules []*GrayRule
Rewrite *Rewrite
Html string
BaseDeployment *Deployment
GrayDeployments []*Deployment
BackendGrayTag string
@@ -84,6 +85,7 @@ func JsonToGrayConfig(json gjson.Result, grayConfig *GrayConfig) {
grayConfig.GraySubKey = json.Get("graySubKey").String()
grayConfig.BackendGrayTag = json.Get("backendGrayTag").String()
grayConfig.UserStickyMaxAge = json.Get("userStickyMaxAge").String()
grayConfig.Html = json.Get("html").String()
if grayConfig.UserStickyMaxAge == "" {
// 默认值2天