管理系统安全设置增加“自定义客户端IP报头”

This commit is contained in:
刘祥超
2023-12-10 10:46:35 +08:00
parent daaa165d25
commit d8ae1525be
9 changed files with 47 additions and 23 deletions

View File

@@ -77,6 +77,8 @@ func (this *IndexAction) RunPost(params struct {
AllowIPs []string
AllowRememberLogin bool
ClientIPHeaderNames string
DenySearchEngines bool
DenySpiders bool
@@ -137,6 +139,9 @@ func (this *IndexAction) RunPost(params struct {
// 允许本地
config.AllowLocal = params.AllowLocal
// 客户端IP获取方式
config.ClientIPHeaderNames = params.ClientIPHeaderNames
// 禁止搜索引擎和爬虫
config.DenySearchEngines = params.DenySearchEngines
config.DenySpiders = params.DenySpiders