1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

feat: 修改网站日志的关闭参数 (#2475)

Refs https://github.com/1Panel-dev/1Panel/issues/2374
This commit is contained in:
zhengkunwang 2023-10-08 22:54:18 -05:00 committed by GitHub
parent 2fdf2b9378
commit 256be27f92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -964,10 +964,11 @@ func (w WebsiteService) OpWebsiteLog(req request.WebsiteLogReq) (*response.Websi
}
var nginxParams []dto.NginxParam
nginxParams = append(nginxParams, dto.NginxParam{
Name: key,
Name: key,
Params: []string{"off"},
})
if err := deleteNginxConfig(constant.NginxScopeServer, nginxParams, &website); err != nil {
if err := updateNginxConfig(constant.NginxScopeServer, nginxParams, &website); err != nil {
return nil, err
}
if err := websiteRepo.Save(context.Background(), &website); err != nil {