系统安全设置中增加“仅从自定义报头中获取IP”选项

This commit is contained in:
GoEdgeLab
2024-04-08 11:21:56 +08:00
parent 94eab14d3d
commit 1efe256cbd
3 changed files with 14 additions and 1 deletions

View File

@@ -83,6 +83,7 @@ func (this *IndexAction) RunPost(params struct {
AllowRememberLogin bool
ClientIPHeaderNames string
ClientIPHeaderOnly bool
DenySearchEngines bool
DenySpiders bool
@@ -146,6 +147,7 @@ func (this *IndexAction) RunPost(params struct {
// 客户端IP获取方式
config.ClientIPHeaderNames = params.ClientIPHeaderNames
config.ClientIPHeaderOnly = params.ClientIPHeaderOnly
// 禁止搜索引擎和爬虫
config.DenySearchEngines = params.DenySearchEngines