mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 12:20:28 +08:00
访客IP设置中支持多个请求报头
This commit is contained in:
@@ -100,10 +100,11 @@ func (this *IndexAction) RunPost(params struct {
|
||||
HttpAllNodeIPShowPage bool
|
||||
HttpAllEnableServerAddrVariable bool
|
||||
|
||||
HttpAllServerName string
|
||||
HttpAllSupportsLowVersionHTTP bool
|
||||
HttpAllMatchCertFromAllServers bool
|
||||
HttpAllForceLnRequest bool
|
||||
HttpAllServerName string
|
||||
HttpAllSupportsLowVersionHTTP bool
|
||||
HttpAllMatchCertFromAllServers bool
|
||||
HttpAllForceLnRequest bool
|
||||
HttpAllLnRequestSchedulingMethod string
|
||||
|
||||
HttpAccessLogIsOn bool
|
||||
HttpAccessLogEnableRequestHeaders bool
|
||||
@@ -176,6 +177,7 @@ func (this *IndexAction) RunPost(params struct {
|
||||
config.HTTPAll.SupportsLowVersionHTTP = params.HttpAllSupportsLowVersionHTTP
|
||||
config.HTTPAll.MatchCertFromAllServers = params.HttpAllMatchCertFromAllServers
|
||||
config.HTTPAll.ForceLnRequest = params.HttpAllForceLnRequest
|
||||
config.HTTPAll.LnRequestSchedulingMethod = params.HttpAllLnRequestSchedulingMethod
|
||||
config.HTTPAll.EnableServerAddrVariable = params.HttpAllEnableServerAddrVariable
|
||||
|
||||
// 访问日志
|
||||
|
||||
@@ -66,7 +66,7 @@ func (this *IndexAction) RunPost(params struct {
|
||||
this.FailField("requestHeaderName", "请输入请求报头")
|
||||
return
|
||||
}
|
||||
if !regexp.MustCompile(`^[\w-_]+$`).MatchString(remoteAddrConfig.RequestHeaderName) {
|
||||
if !regexp.MustCompile(`^[\w-_,]+$`).MatchString(remoteAddrConfig.RequestHeaderName) {
|
||||
this.FailField("requestHeaderName", "请求报头中只能含有数字、英文字母、下划线、中划线")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ func (this *IndexAction) RunPost(params struct {
|
||||
this.FailField("requestHeaderName", "请输入请求报头")
|
||||
return
|
||||
}
|
||||
if !regexp.MustCompile(`^[\w-_]+$`).MatchString(remoteAddrConfig.RequestHeaderName) {
|
||||
if !regexp.MustCompile(`^[\w-_,]+$`).MatchString(remoteAddrConfig.RequestHeaderName) {
|
||||
this.FailField("requestHeaderName", "请求报头中只能含有数字、英文字母、下划线、中划线")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ func (this *IndexAction) RunPost(params struct {
|
||||
this.FailField("requestHeaderName", "请输入请求报头")
|
||||
return
|
||||
}
|
||||
if !regexp.MustCompile(`^[\w-_]+$`).MatchString(remoteAddrConfig.RequestHeaderName) {
|
||||
if !regexp.MustCompile(`^[\w-_,]+$`).MatchString(remoteAddrConfig.RequestHeaderName) {
|
||||
this.FailField("requestHeaderName", "请求报头中只能含有数字、英文字母、下划线、中划线")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user