mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-12 19:30:26 +08:00
访客IP设置中支持多个请求报头
This commit is contained in:
@@ -100,10 +100,11 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
HttpAllNodeIPShowPage bool
|
HttpAllNodeIPShowPage bool
|
||||||
HttpAllEnableServerAddrVariable bool
|
HttpAllEnableServerAddrVariable bool
|
||||||
|
|
||||||
HttpAllServerName string
|
HttpAllServerName string
|
||||||
HttpAllSupportsLowVersionHTTP bool
|
HttpAllSupportsLowVersionHTTP bool
|
||||||
HttpAllMatchCertFromAllServers bool
|
HttpAllMatchCertFromAllServers bool
|
||||||
HttpAllForceLnRequest bool
|
HttpAllForceLnRequest bool
|
||||||
|
HttpAllLnRequestSchedulingMethod string
|
||||||
|
|
||||||
HttpAccessLogIsOn bool
|
HttpAccessLogIsOn bool
|
||||||
HttpAccessLogEnableRequestHeaders bool
|
HttpAccessLogEnableRequestHeaders bool
|
||||||
@@ -176,6 +177,7 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
config.HTTPAll.SupportsLowVersionHTTP = params.HttpAllSupportsLowVersionHTTP
|
config.HTTPAll.SupportsLowVersionHTTP = params.HttpAllSupportsLowVersionHTTP
|
||||||
config.HTTPAll.MatchCertFromAllServers = params.HttpAllMatchCertFromAllServers
|
config.HTTPAll.MatchCertFromAllServers = params.HttpAllMatchCertFromAllServers
|
||||||
config.HTTPAll.ForceLnRequest = params.HttpAllForceLnRequest
|
config.HTTPAll.ForceLnRequest = params.HttpAllForceLnRequest
|
||||||
|
config.HTTPAll.LnRequestSchedulingMethod = params.HttpAllLnRequestSchedulingMethod
|
||||||
config.HTTPAll.EnableServerAddrVariable = params.HttpAllEnableServerAddrVariable
|
config.HTTPAll.EnableServerAddrVariable = params.HttpAllEnableServerAddrVariable
|
||||||
|
|
||||||
// 访问日志
|
// 访问日志
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
this.FailField("requestHeaderName", "请输入请求报头")
|
this.FailField("requestHeaderName", "请输入请求报头")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !regexp.MustCompile(`^[\w-_]+$`).MatchString(remoteAddrConfig.RequestHeaderName) {
|
if !regexp.MustCompile(`^[\w-_,]+$`).MatchString(remoteAddrConfig.RequestHeaderName) {
|
||||||
this.FailField("requestHeaderName", "请求报头中只能含有数字、英文字母、下划线、中划线")
|
this.FailField("requestHeaderName", "请求报头中只能含有数字、英文字母、下划线、中划线")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
this.FailField("requestHeaderName", "请输入请求报头")
|
this.FailField("requestHeaderName", "请输入请求报头")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !regexp.MustCompile(`^[\w-_]+$`).MatchString(remoteAddrConfig.RequestHeaderName) {
|
if !regexp.MustCompile(`^[\w-_,]+$`).MatchString(remoteAddrConfig.RequestHeaderName) {
|
||||||
this.FailField("requestHeaderName", "请求报头中只能含有数字、英文字母、下划线、中划线")
|
this.FailField("requestHeaderName", "请求报头中只能含有数字、英文字母、下划线、中划线")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
this.FailField("requestHeaderName", "请输入请求报头")
|
this.FailField("requestHeaderName", "请输入请求报头")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !regexp.MustCompile(`^[\w-_]+$`).MatchString(remoteAddrConfig.RequestHeaderName) {
|
if !regexp.MustCompile(`^[\w-_,]+$`).MatchString(remoteAddrConfig.RequestHeaderName) {
|
||||||
this.FailField("requestHeaderName", "请求报头中只能含有数字、英文字母、下划线、中划线")
|
this.FailField("requestHeaderName", "请求报头中只能含有数字、英文字母、下划线、中划线")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,6 +193,17 @@
|
|||||||
<p class="comment">选中后,所有请求优先发送到L2或者更高级别节点。默认不开启的情况下,只有可以缓存的内容请求才会发送到L2或者更高级别节点。</p>
|
<p class="comment">选中后,所有请求优先发送到L2或者更高级别节点。默认不开启的情况下,只有可以缓存的内容请求才会发送到L2或者更高级别节点。</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Ln请求负载均衡方法</td>
|
||||||
|
<td>
|
||||||
|
<select class="ui dropdown auto-width" name="httpAllLnRequestSchedulingMethod" v-model="config.httpAll.lnRequestSchedulingMethod">
|
||||||
|
<option value="urlMapping">URL映射</option>
|
||||||
|
<option value="random">随机</option>
|
||||||
|
</select>
|
||||||
|
<p class="comment" v-if="config.httpAll.lnRequestSchedulingMethod == 'urlMapping'">当存在多个Ln节点时,将请求根据URL自动映射到某个固定的Ln节点。</p>
|
||||||
|
<p class="comment" v-if="config.httpAll.lnRequestSchedulingMethod == 'random'">当存在多个Ln节点时,将请求随机发送到某个Ln节点。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>支持${serverAddr}变量</td>
|
<td>支持${serverAddr}变量</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user