From 914070f7ccbb2afe7e0d4d249b11bfae3a268643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Fri, 17 Mar 2023 12:15:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/nodeconfigs/uam_policy.go | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/pkg/nodeconfigs/uam_policy.go b/pkg/nodeconfigs/uam_policy.go index dd5e634..24b9ea2 100644 --- a/pkg/nodeconfigs/uam_policy.go +++ b/pkg/nodeconfigs/uam_policy.go @@ -1,26 +1,12 @@ -// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . +// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . +//go:build !plus package nodeconfigs -func init() { - _ = DefaultUAMPolicy.Init() -} - -var DefaultUAMPolicy = &UAMPolicy{ - IsOn: true, - AllowSearchEngines: true, - DenySpiders: true, - UITitle: "", - UIBody: "", -} +var DefaultUAMPolicy = &UAMPolicy{} type UAMPolicy struct { - IsOn bool `yaml:"isOn" json:"isOn"` - AllowSearchEngines bool `yaml:"allowSearchEngines" json:"allowSearchEngines"` // 直接跳过常见搜索引擎 - DenySpiders bool `yaml:"denySpiders" json:"denySpiders"` // 拦截常见爬虫 - - UITitle string `yaml:"uiTitle" json:"uiTitle"` // 页面标题 - UIBody string `yaml:"uiBody" json:"uiBody"` // 页面内容 + IsOn bool `yaml:"isOn" json:"isOn"` } func (this *UAMPolicy) Init() error {