From 50e99f1f4c40d7050995601e2a6ad477f428c983 Mon Sep 17 00:00:00 2001 From: CityFun <31820853+zhengkunwang223@users.noreply.github.com> Date: Tue, 9 Sep 2025 11:22:43 +0800 Subject: [PATCH] fix: Fixed issue with can not disable cache in antiLeech (#10306) --- agent/app/dto/request/nginx.go | 4 ++-- .../views/website/website/config/basic/anti-Leech/index.vue | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/agent/app/dto/request/nginx.go b/agent/app/dto/request/nginx.go index 8fc9df202..c8c8e9cae 100644 --- a/agent/app/dto/request/nginx.go +++ b/agent/app/dto/request/nginx.go @@ -81,8 +81,8 @@ type NginxCommonReq struct { type NginxAntiLeechUpdate struct { WebsiteID uint `json:"websiteID" validate:"required"` - Extends string `json:"extends" validate:"required"` - Return string `json:"return" validate:"required"` + Extends string `json:"extends"` + Return string `json:"return"` Enable bool `json:"enable" ` ServerNames []string `json:"serverNames"` Cache bool `json:"cache"` diff --git a/frontend/src/views/website/website/config/basic/anti-Leech/index.vue b/frontend/src/views/website/website/config/basic/anti-Leech/index.vue index f0c655300..327fe751e 100644 --- a/frontend/src/views/website/website/config/basic/anti-Leech/index.vue +++ b/frontend/src/views/website/website/config/basic/anti-Leech/index.vue @@ -240,9 +240,9 @@ const update = async (enable: boolean) => { if (enable) { updateDomainsString(); form.serverNames = form.domains.split('\n'); - } - if (!checkReturn()) { - return; + if (!checkReturn()) { + return; + } } form.enable = enable; loading.value = true;