配置初始化时增加context参数

This commit is contained in:
GoEdgeLab
2023-03-18 22:12:22 +08:00
parent cfda4857c9
commit 7c0412755b
12 changed files with 15 additions and 15 deletions

View File

@@ -65,14 +65,14 @@ func (this *SettingAction) RunPost(params struct {
// TODO 校验配置
reverseProxyConfig := &serverconfigs.ReverseProxyConfig{}
var reverseProxyConfig = &serverconfigs.ReverseProxyConfig{}
err := json.Unmarshal(params.ReverseProxyJSON, reverseProxyConfig)
if err != nil {
this.ErrorPage(err)
return
}
err = reverseProxyConfig.Init()
err = reverseProxyConfig.Init(nil)
if err != nil {
this.Fail("配置校验失败:" + err.Error())
}