mirror of
https://github.com/alibaba/higress.git
synced 2026-04-21 20:17:29 +08:00
增加 useManifestAsEntry 配置支持 || Increase the useManifestAsEntry configuration support (#2499)
Co-authored-by: rinfx <yucheng.lxr@alibaba-inc.com>
This commit is contained in:
@@ -60,6 +60,7 @@ type BodyInjection struct {
|
||||
|
||||
type GrayConfig struct {
|
||||
StoreMaxAge int
|
||||
UseManifestAsEntry bool
|
||||
GrayKey string
|
||||
LocalStorageGrayKey string
|
||||
GraySubKey string
|
||||
@@ -129,6 +130,7 @@ func convertToStringMap(result gjson.Result) map[string]string {
|
||||
func JsonToGrayConfig(json gjson.Result, grayConfig *GrayConfig) error {
|
||||
// 解析 GrayKey
|
||||
grayConfig.LocalStorageGrayKey = json.Get("localStorageGrayKey").String()
|
||||
grayConfig.UseManifestAsEntry = json.Get("useManifestAsEntry").Bool()
|
||||
grayConfig.GrayKey = json.Get("grayKey").String()
|
||||
if grayConfig.LocalStorageGrayKey != "" {
|
||||
grayConfig.GrayKey = grayConfig.LocalStorageGrayKey
|
||||
|
||||
Reference in New Issue
Block a user