Files
SamWaf/api/waf_engine.go
T
2026-03-09 15:55:15 +08:00

25 lines
628 B
Go

package api
import (
"SamWaf/global"
"SamWaf/model/common/response"
"github.com/gin-gonic/gin"
)
type WafEngineApi struct {
}
// ResetWaf 重启WAF引擎
// @Summary 重启WAF引擎
// @Description 重启WAF引擎,重新加载所有规则和配置
// @Tags 引擎-WAF引擎
// @Produce json
// @Success 200 {object} response.Response "重启指令发起成功"
// @Security ApiKeyAuth
// @Router /wafhost/engine/restart [post]
func (w *WafEngineApi) ResetWaf(c *gin.Context) {
//重启WAF引擎
global.GWAF_CHAN_ENGINE <- 1
response.OkWithMessage("重启指令发起成功", c)
}