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;