From 6b244b2b03a7665021f4c93c10ba732c7f3a85df Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:42:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=A0=E9=99=A4=E6=97=A7=E7=89=88?= =?UTF-8?q?=E6=9C=AC=20WAF=20=E9=85=8D=E7=BD=AE=20(#4327)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/api/v1/website.go | 63 ------ backend/app/service/website.go | 72 ------ backend/router/ro_website.go | 4 - cmd/server/docs/docs.go | 212 ++---------------- cmd/server/docs/swagger.json | 208 ++--------------- cmd/server/docs/swagger.yaml | 133 ++--------- cmd/server/nginx_conf/website_default.conf | 16 -- frontend/src/api/interface/website.ts | 23 -- frontend/src/api/modules/website.ts | 12 - .../views/website/website/config/index.vue | 4 - .../website/config/safety/ccdeny/index.vue | 129 ----------- .../config/safety/file-block-list/index.vue | 134 ----------- .../website/website/config/safety/index.vue | 74 ------ .../config/safety/simple-list/index.vue | 181 --------------- .../config/safety/value-list/index.vue | 184 --------------- frontend/src/views/website/website/index.vue | 10 - 16 files changed, 59 insertions(+), 1400 deletions(-) delete mode 100644 frontend/src/views/website/website/config/safety/ccdeny/index.vue delete mode 100644 frontend/src/views/website/website/config/safety/file-block-list/index.vue delete mode 100644 frontend/src/views/website/website/config/safety/index.vue delete mode 100644 frontend/src/views/website/website/config/safety/simple-list/index.vue delete mode 100644 frontend/src/views/website/website/config/safety/value-list/index.vue diff --git a/backend/app/api/v1/website.go b/backend/app/api/v1/website.go index ab151c27f..fa5ef6584 100644 --- a/backend/app/api/v1/website.go +++ b/backend/app/api/v1/website.go @@ -305,69 +305,6 @@ func (b *BaseApi) CreateWebsiteCheck(c *gin.Context) { helper.SuccessWithData(c, data) } -// @Tags Website WAF -// @Summary Load websit waf conf -// @Description 获取网站 waf 配置 -// @Accept json -// @Param request body request.WebsiteWafReq true "request" -// @Success 200 {object} response.WebsiteWafConfig -// @Security ApiKeyAuth -// @Router /websites/waf/config [post] -func (b *BaseApi) GetWebsiteWafConfig(c *gin.Context) { - var req request.WebsiteWafReq - if err := helper.CheckBindAndValidate(&req, c); err != nil { - return - } - data, err := websiteService.GetWafConfig(req) - if err != nil { - helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) - return - } - helper.SuccessWithData(c, data) -} - -// @Tags Website WAF -// @Summary Update website waf conf -// @Description 更新 网站 waf 配置 -// @Accept json -// @Param request body request.WebsiteWafUpdate true "request" -// @Success 200 -// @Security ApiKeyAuth -// @Router /websites/waf/update [post] -// @x-panel-log {"bodyKeys":["websiteId"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"websiteId","isList":false,"db":"websites","output_column":"primary_domain","output_value":"domain"}],"formatZH":"WAF 配置修改 [domain]","formatEN":"WAF conf update [domain]"} -func (b *BaseApi) UpdateWebsiteWafConfig(c *gin.Context) { - var req request.WebsiteWafUpdate - if err := helper.CheckBindAndValidate(&req, c); err != nil { - return - } - if err := websiteService.UpdateWafConfig(req); err != nil { - helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) - return - } - helper.SuccessWithData(c, nil) -} - -// @Tags Website WAF -// @Summary Update website waf file -// @Description 更新 网站 waf 配置文件 -// @Accept json -// @Param request body request.WebsiteWafUpdate true "request" -// @Success 200 -// @Security ApiKeyAuth -// @Router /websites/waf/file/update [post] -// @x-panel-log {"bodyKeys":["websiteId"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"websiteId","isList":false,"db":"websites","output_column":"primary_domain","output_value":"domain"}],"formatZH":"WAF 配置文件修改 [domain]","formatEN":"WAF conf file update [domain]"} -func (b *BaseApi) UpdateWebsiteWafFile(c *gin.Context) { - var req request.WebsiteWafFileUpdate - if err := helper.CheckBindAndValidate(&req, c); err != nil { - return - } - if err := websiteService.UpdateWafFile(req); err != nil { - helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) - return - } - helper.SuccessWithData(c, nil) -} - // @Tags Website Nginx // @Summary Update website nginx conf // @Description 更新 网站 nginx 配置 diff --git a/backend/app/service/website.go b/backend/app/service/website.go index 6bfdca35d..bc63e1e4e 100644 --- a/backend/app/service/website.go +++ b/backend/app/service/website.go @@ -75,10 +75,6 @@ type IWebsiteService interface { ChangeDefaultServer(id uint) error PreInstallCheck(req request.WebsiteInstallCheckReq) ([]response.WebsitePreInstallCheck, error) - GetWafConfig(req request.WebsiteWafReq) (response.WebsiteWafConfig, error) - UpdateWafConfig(req request.WebsiteWafUpdate) error - UpdateWafFile(req request.WebsiteWafFileUpdate) (err error) - GetPHPConfig(id uint) (*response.PHPConfig, error) UpdatePHPConfig(req request.WebsitePHPConfigUpdate) error UpdatePHPConfigFile(req request.WebsitePHPFileUpdate) error @@ -327,7 +323,6 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error) case constant.RuntimeNode: website.Proxy = fmt.Sprintf("127.0.0.1:%d", runtime.Port) } - } if err = configDefaultNginx(website, domains, appInstall, runtime); err != nil { @@ -852,56 +847,6 @@ func (w WebsiteService) PreInstallCheck(req request.WebsiteInstallCheckReq) ([]r return nil, nil } -func (w WebsiteService) GetWafConfig(req request.WebsiteWafReq) (response.WebsiteWafConfig, error) { - var res response.WebsiteWafConfig - website, err := websiteRepo.GetFirst(commonRepo.WithByID(req.WebsiteID)) - if err != nil { - return res, nil - } - - res.Enable = true - if req.Key != "" { - params, err := getNginxParamsByKeys(constant.NginxScopeServer, []string{"set"}, &website) - if err != nil { - return res, nil - } - for _, param := range params { - if param.Params[0] == req.Key { - res.Enable = len(param.Params) > 1 && param.Params[1] == "on" - break - } - } - } - - nginxFull, err := getNginxFull(&website) - if err != nil { - return res, nil - } - - filePath := path.Join(nginxFull.SiteDir, "sites", website.Alias, "waf", "rules", req.Rule+".json") - content, err := os.ReadFile(filePath) - if err != nil { - return res, nil - } - res.Content = string(content) - - return res, nil -} - -func (w WebsiteService) UpdateWafConfig(req request.WebsiteWafUpdate) error { - website, err := websiteRepo.GetFirst(commonRepo.WithByID(req.WebsiteID)) - if err != nil { - return err - } - updateValue := "on" - if !req.Enable { - updateValue = "off" - } - return updateNginxConfig(constant.NginxScopeServer, []dto.NginxParam{ - {Name: "set", Params: []string{req.Key, updateValue}}, - }, &website) -} - func (w WebsiteService) UpdateNginxConfigFile(req request.WebsiteNginxUpdate) error { website, err := websiteRepo.GetFirst(commonRepo.WithByID(req.ID)) if err != nil { @@ -2339,23 +2284,6 @@ func (w WebsiteService) UpdateRedirectFile(req request.NginxRedirectUpdate) (err return updateNginxConfig(constant.NginxScopeServer, nil, &website) } -func (w WebsiteService) UpdateWafFile(req request.WebsiteWafFileUpdate) (err error) { - var ( - website model.Website - nginxInstall model.AppInstall - ) - website, err = websiteRepo.GetFirst(commonRepo.WithByID(req.WebsiteID)) - if err != nil { - return err - } - nginxInstall, err = getAppInstallByKey(constant.AppOpenresty) - if err != nil { - return - } - rulePath := path.Join(nginxInstall.GetPath(), "www", "sites", website.Alias, "waf", "rules", fmt.Sprintf("%s.json", req.Type)) - return files.NewFileOp().WriteFile(rulePath, strings.NewReader(req.Content), 0755) -} - func (w WebsiteService) LoadWebsiteDirConfig(req request.WebsiteCommonReq) (*response.WebsiteDirConfig, error) { website, err := websiteRepo.GetFirst(commonRepo.WithByID(req.ID)) if err != nil { diff --git a/backend/router/ro_website.go b/backend/router/ro_website.go index 059e572a6..c7100627c 100644 --- a/backend/router/ro_website.go +++ b/backend/router/ro_website.go @@ -39,10 +39,6 @@ func (a *WebsiteRouter) InitRouter(Router *gin.RouterGroup) { groupRouter.GET("/:id/https", baseApi.GetHTTPSConfig) groupRouter.POST("/:id/https", baseApi.UpdateHTTPSConfig) - groupRouter.POST("/waf/config", baseApi.GetWebsiteWafConfig) - groupRouter.POST("/waf/update", baseApi.UpdateWebsiteWafConfig) - groupRouter.POST("/waf/file/update", baseApi.UpdateWebsiteWafFile) - groupRouter.GET("/php/config/:id", baseApi.GetWebsitePHPConfig) groupRouter.POST("/php/config", baseApi.UpdateWebsitePHPConfig) groupRouter.POST("/php/update", baseApi.UpdatePHPFile) diff --git a/cmd/server/docs/docs.go b/cmd/server/docs/docs.go index 84fe1f740..4207e9884 100644 --- a/cmd/server/docs/docs.go +++ b/cmd/server/docs/docs.go @@ -1,5 +1,5 @@ -// Code generated by swaggo/swag. DO NOT EDIT. - +// Package docs GENERATED BY SWAG; DO NOT EDIT +// This file was generated by swaggo/swag package docs import "github.com/swaggo/swag" @@ -9158,6 +9158,28 @@ const docTemplate = `{ } } }, + "/runtimes/sync": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步运行环境状态", + "consumes": [ + "application/json" + ], + "tags": [ + "Runtime" + ], + "summary": "Sync runtime status", + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/runtimes/update": { "post": { "security": [ @@ -13918,144 +13940,6 @@ const docTemplate = `{ "paramKeys": [] } } - }, - "/websites/waf/config": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "获取网站 waf 配置", - "consumes": [ - "application/json" - ], - "tags": [ - "Website WAF" - ], - "summary": "Load websit waf conf", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.WebsiteWafReq" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.WebsiteWafConfig" - } - } - } - } - }, - "/websites/waf/file/update": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "更新 网站 waf 配置文件", - "consumes": [ - "application/json" - ], - "tags": [ - "Website WAF" - ], - "summary": "Update website waf file", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.WebsiteWafUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "websiteId", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], - "bodyKeys": [ - "websiteId" - ], - "formatEN": "WAF conf file update [domain]", - "formatZH": "WAF 配置文件修改 [domain]", - "paramKeys": [] - } - } - }, - "/websites/waf/update": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "更新 网站 waf 配置", - "consumes": [ - "application/json" - ], - "tags": [ - "Website WAF" - ], - "summary": "Update website waf conf", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.WebsiteWafUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "websiteId", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], - "bodyKeys": [ - "websiteId" - ], - "formatEN": "WAF conf update [domain]", - "formatZH": "WAF 配置修改 [domain]", - "paramKeys": [] - } - } } }, "definitions": { @@ -20777,43 +20661,6 @@ const docTemplate = `{ } } }, - "request.WebsiteWafReq": { - "type": "object", - "required": [ - "key", - "rule", - "websiteId" - ], - "properties": { - "key": { - "type": "string" - }, - "rule": { - "type": "string" - }, - "websiteId": { - "type": "integer" - } - } - }, - "request.WebsiteWafUpdate": { - "type": "object", - "required": [ - "key", - "websiteId" - ], - "properties": { - "enable": { - "type": "boolean" - }, - "key": { - "type": "string" - }, - "websiteId": { - "type": "integer" - } - } - }, "response.AppDTO": { "type": "object", "properties": { @@ -21493,17 +21340,6 @@ const docTemplate = `{ "type": "string" } } - }, - "response.WebsiteWafConfig": { - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "enable": { - "type": "boolean" - } - } } } }` diff --git a/cmd/server/docs/swagger.json b/cmd/server/docs/swagger.json index f48698549..58fd04027 100644 --- a/cmd/server/docs/swagger.json +++ b/cmd/server/docs/swagger.json @@ -9151,6 +9151,28 @@ } } }, + "/runtimes/sync": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步运行环境状态", + "consumes": [ + "application/json" + ], + "tags": [ + "Runtime" + ], + "summary": "Sync runtime status", + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/runtimes/update": { "post": { "security": [ @@ -13911,144 +13933,6 @@ "paramKeys": [] } } - }, - "/websites/waf/config": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "获取网站 waf 配置", - "consumes": [ - "application/json" - ], - "tags": [ - "Website WAF" - ], - "summary": "Load websit waf conf", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.WebsiteWafReq" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.WebsiteWafConfig" - } - } - } - } - }, - "/websites/waf/file/update": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "更新 网站 waf 配置文件", - "consumes": [ - "application/json" - ], - "tags": [ - "Website WAF" - ], - "summary": "Update website waf file", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.WebsiteWafUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "websiteId", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], - "bodyKeys": [ - "websiteId" - ], - "formatEN": "WAF conf file update [domain]", - "formatZH": "WAF 配置文件修改 [domain]", - "paramKeys": [] - } - } - }, - "/websites/waf/update": { - "post": { - "security": [ - { - "ApiKeyAuth": [] - } - ], - "description": "更新 网站 waf 配置", - "consumes": [ - "application/json" - ], - "tags": [ - "Website WAF" - ], - "summary": "Update website waf conf", - "parameters": [ - { - "description": "request", - "name": "request", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/request.WebsiteWafUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "websiteId", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], - "bodyKeys": [ - "websiteId" - ], - "formatEN": "WAF conf update [domain]", - "formatZH": "WAF 配置修改 [domain]", - "paramKeys": [] - } - } } }, "definitions": { @@ -20770,43 +20654,6 @@ } } }, - "request.WebsiteWafReq": { - "type": "object", - "required": [ - "key", - "rule", - "websiteId" - ], - "properties": { - "key": { - "type": "string" - }, - "rule": { - "type": "string" - }, - "websiteId": { - "type": "integer" - } - } - }, - "request.WebsiteWafUpdate": { - "type": "object", - "required": [ - "key", - "websiteId" - ], - "properties": { - "enable": { - "type": "boolean" - }, - "key": { - "type": "string" - }, - "websiteId": { - "type": "integer" - } - } - }, "response.AppDTO": { "type": "object", "properties": { @@ -21486,17 +21333,6 @@ "type": "string" } } - }, - "response.WebsiteWafConfig": { - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "enable": { - "type": "boolean" - } - } } } } \ No newline at end of file diff --git a/cmd/server/docs/swagger.yaml b/cmd/server/docs/swagger.yaml index 0d1960faf..5236f1f0c 100644 --- a/cmd/server/docs/swagger.yaml +++ b/cmd/server/docs/swagger.yaml @@ -4517,31 +4517,6 @@ definitions: - id - user type: object - request.WebsiteWafReq: - properties: - key: - type: string - rule: - type: string - websiteId: - type: integer - required: - - key - - rule - - websiteId - type: object - request.WebsiteWafUpdate: - properties: - enable: - type: boolean - key: - type: string - websiteId: - type: integer - required: - - key - - websiteId - type: object response.AppDTO: properties: createdAt: @@ -4990,13 +4965,6 @@ definitions: version: type: string type: object - response.WebsiteWafConfig: - properties: - content: - type: string - enable: - type: boolean - type: object host: localhost info: contact: {} @@ -10791,6 +10759,19 @@ paths: summary: List runtimes tags: - Runtime + /runtimes/sync: + post: + consumes: + - application/json + description: 同步运行环境状态 + responses: + "200": + description: OK + security: + - ApiKeyAuth: [] + summary: Sync runtime status + tags: + - Runtime /runtimes/update: post: consumes: @@ -13810,92 +13791,4 @@ paths: formatEN: Update website [primaryDomain] formatZH: 更新网站 [primaryDomain] paramKeys: [] - /websites/waf/config: - post: - consumes: - - application/json - description: 获取网站 waf 配置 - parameters: - - description: request - in: body - name: request - required: true - schema: - $ref: '#/definitions/request.WebsiteWafReq' - responses: - "200": - description: OK - schema: - $ref: '#/definitions/response.WebsiteWafConfig' - security: - - ApiKeyAuth: [] - summary: Load websit waf conf - tags: - - Website WAF - /websites/waf/file/update: - post: - consumes: - - application/json - description: 更新 网站 waf 配置文件 - parameters: - - description: request - in: body - name: request - required: true - schema: - $ref: '#/definitions/request.WebsiteWafUpdate' - responses: - "200": - description: OK - security: - - ApiKeyAuth: [] - summary: Update website waf file - tags: - - Website WAF - x-panel-log: - BeforeFunctions: - - db: websites - input_column: id - input_value: websiteId - isList: false - output_column: primary_domain - output_value: domain - bodyKeys: - - websiteId - formatEN: WAF conf file update [domain] - formatZH: WAF 配置文件修改 [domain] - paramKeys: [] - /websites/waf/update: - post: - consumes: - - application/json - description: 更新 网站 waf 配置 - parameters: - - description: request - in: body - name: request - required: true - schema: - $ref: '#/definitions/request.WebsiteWafUpdate' - responses: - "200": - description: OK - security: - - ApiKeyAuth: [] - summary: Update website waf conf - tags: - - Website WAF - x-panel-log: - BeforeFunctions: - - db: websites - input_column: id - input_value: websiteId - isList: false - output_column: primary_domain - output_value: domain - bodyKeys: - - websiteId - formatEN: WAF conf update [domain] - formatZH: WAF 配置修改 [domain] - paramKeys: [] swagger: "2.0" diff --git a/cmd/server/nginx_conf/website_default.conf b/cmd/server/nginx_conf/website_default.conf index 3aa1eccf9..cb636e1d4 100644 --- a/cmd/server/nginx_conf/website_default.conf +++ b/cmd/server/nginx_conf/website_default.conf @@ -16,22 +16,6 @@ server { access_log /www/sites/domain/log/access.log; error_log /www/sites/domain/log/error.log; - access_by_lua_file /www/common/waf/access.lua; - set $RulePath /www/sites/domain/waf/rules; - set $logdir /www/sites/domain/waf/log; - set $redirect on; - set $attackLog on; - set $CCDeny off; - set $urlWhiteAllow off; - set $urlBlockDeny off; - set $argsDeny off; - set $postDeny off; - set $cookieDeny off; - set $fileExtDeny off; - set $ipBlockDeny off; - set $ipWhiteAllow off; - - location ^~ /.well-known/acme-challenge { allow all; root /usr/share/nginx/html; diff --git a/frontend/src/api/interface/website.ts b/frontend/src/api/interface/website.ts index 904a5e6d5..d18c4e947 100644 --- a/frontend/src/api/interface/website.ts +++ b/frontend/src/api/interface/website.ts @@ -258,29 +258,6 @@ export namespace Website { appName: string; } - export interface WafReq { - websiteId: number; - key: string; - rule: string; - } - - export interface WafRes { - enable: boolean; - content: string; - } - - export interface WafUpdate { - enable: boolean; - websiteId: number; - key: string; - } - - export interface WafFileUpdate { - websiteId: number; - type: string; - content: string; - } - export interface DelReq { id: number; } diff --git a/frontend/src/api/modules/website.ts b/frontend/src/api/modules/website.ts index bd1d26ceb..9452c1bc4 100644 --- a/frontend/src/api/modules/website.ts +++ b/frontend/src/api/modules/website.ts @@ -144,18 +144,6 @@ export const PreCheck = (req: Website.CheckReq) => { return http.post(`/websites/check`, req); }; -export const GetWafConfig = (req: Website.WafReq) => { - return http.post(`/websites/waf/config`, req); -}; - -export const UpdateWafEnable = (req: Website.WafUpdate) => { - return http.post(`/websites/waf/update`, req); -}; - -export const UpdateWafFile = (req: Website.WafFileUpdate) => { - return http.post(`/websites/waf/file/update`, req); -}; - export const UpdateNginxFile = (req: Website.NginxUpdate) => { return http.post(`/websites/nginx/update`, req); }; diff --git a/frontend/src/views/website/website/config/index.vue b/frontend/src/views/website/website/config/index.vue index 97098d011..bfe2b9bd5 100644 --- a/frontend/src/views/website/website/config/index.vue +++ b/frontend/src/views/website/website/config/index.vue @@ -21,9 +21,6 @@ {{ $t('website.basic') }} - - {{ $t('website.security') }} - {{ $t('website.log') }} @@ -48,7 +45,6 @@ diff --git a/frontend/src/views/website/website/config/safety/file-block-list/index.vue b/frontend/src/views/website/website/config/safety/file-block-list/index.vue deleted file mode 100644 index ec62d7ec9..000000000 --- a/frontend/src/views/website/website/config/safety/file-block-list/index.vue +++ /dev/null @@ -1,134 +0,0 @@ - - diff --git a/frontend/src/views/website/website/config/safety/index.vue b/frontend/src/views/website/website/config/safety/index.vue deleted file mode 100644 index caccb600a..000000000 --- a/frontend/src/views/website/website/config/safety/index.vue +++ /dev/null @@ -1,74 +0,0 @@ - - diff --git a/frontend/src/views/website/website/config/safety/simple-list/index.vue b/frontend/src/views/website/website/config/safety/simple-list/index.vue deleted file mode 100644 index b90e3a75a..000000000 --- a/frontend/src/views/website/website/config/safety/simple-list/index.vue +++ /dev/null @@ -1,181 +0,0 @@ - - diff --git a/frontend/src/views/website/website/config/safety/value-list/index.vue b/frontend/src/views/website/website/config/safety/value-list/index.vue deleted file mode 100644 index 1876a5c5a..000000000 --- a/frontend/src/views/website/website/config/safety/value-list/index.vue +++ /dev/null @@ -1,184 +0,0 @@ - - diff --git a/frontend/src/views/website/website/index.vue b/frontend/src/views/website/website/index.vue index 16cf84181..6d284884b 100644 --- a/frontend/src/views/website/website/index.vue +++ b/frontend/src/views/website/website/index.vue @@ -281,10 +281,6 @@ const openConfig = (id: number) => { router.push({ name: 'WebsiteConfig', params: { id: id, tab: 'basic' } }); }; -const openWAF = (id: number) => { - router.push({ name: 'WebsiteConfig', params: { id: id, tab: 'safety' } }); -}; - const isEver = (time: string) => { const expireDate = new Date(time); return expireDate < new Date('1970-01-02'); @@ -356,12 +352,6 @@ const buttons = [ openConfig(row.id); }, }, - { - label: 'WAF', - click: function (row: Website.Website) { - openWAF(row.id); - }, - }, { label: i18n.global.t('database.backupList'), click: (row: Website.Website) => {