mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-02-22 00:45:37 +08:00
缓存设置中可以设置缓存主域名,用来复用多域名下的缓存
This commit is contained in:
@@ -53,12 +53,16 @@ func (this *IndexAction) RunPost(params struct {
|
||||
defer this.CreateLogInfo(codes.ServerCache_LogUpdateCacheSettings, params.WebId)
|
||||
|
||||
// 校验配置
|
||||
cacheConfig := &serverconfigs.HTTPCacheConfig{}
|
||||
var cacheConfig = &serverconfigs.HTTPCacheConfig{}
|
||||
err := json.Unmarshal(params.CacheJSON, cacheConfig)
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
// 分组不支持主域名
|
||||
cacheConfig.Key = nil
|
||||
|
||||
err = cacheConfig.Init()
|
||||
if err != nil {
|
||||
this.Fail("检查配置失败:" + err.Error())
|
||||
|
||||
Reference in New Issue
Block a user