mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-29 09:16:36 +08:00
将全局设置的TCP相关设置移到“集群设置--网站设置”中
This commit is contained in:
@@ -18,7 +18,6 @@ import (
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/ddosconfigs"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/iwind/TeaGo/Tea"
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
@@ -1057,30 +1056,6 @@ func (this *NodeDAO) ComposeNodeConfig(tx *dbs.Tx, nodeId int64, dataMap *shared
|
||||
}
|
||||
}
|
||||
|
||||
// 全局设置
|
||||
// TODO 根据用户的不同读取不同的全局设置
|
||||
var settingCacheKey = "SharedSysSettingDAO:" + systemconfigs.SettingCodeServerGlobalConfig
|
||||
settingJSONCache, ok := cacheMap.Get(settingCacheKey)
|
||||
var settingJSON []byte
|
||||
if ok {
|
||||
settingJSON = settingJSONCache.([]byte)
|
||||
} else {
|
||||
settingJSON, err = SharedSysSettingDAO.ReadSetting(tx, systemconfigs.SettingCodeServerGlobalConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cacheMap.Put(settingCacheKey, settingJSON)
|
||||
}
|
||||
|
||||
if len(settingJSON) > 0 {
|
||||
globalConfig := &serverconfigs.GlobalConfig{}
|
||||
err = json.Unmarshal(settingJSON, globalConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
config.GlobalConfig = globalConfig
|
||||
}
|
||||
|
||||
var clusterIndex = 0
|
||||
config.WebPImagePolicies = map[int64]*nodeconfigs.WebPImagePolicy{}
|
||||
config.UAMPolicies = map[int64]*nodeconfigs.UAMPolicy{}
|
||||
|
||||
Reference in New Issue
Block a user