File tree Expand file tree Collapse file tree 5 files changed +20
-7
lines changed
internal/web/actions/default
clusters/cluster/settings/global-server-config
groups/group/settings/remoteAddr
web/views/@default/clusters/cluster/settings/global-server-config Expand file tree Collapse file tree 5 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -100,10 +100,11 @@ func (this *IndexAction) RunPost(params struct {
100
100
HttpAllNodeIPShowPage bool
101
101
HttpAllEnableServerAddrVariable bool
102
102
103
- HttpAllServerName string
104
- HttpAllSupportsLowVersionHTTP bool
105
- HttpAllMatchCertFromAllServers bool
106
- HttpAllForceLnRequest bool
103
+ HttpAllServerName string
104
+ HttpAllSupportsLowVersionHTTP bool
105
+ HttpAllMatchCertFromAllServers bool
106
+ HttpAllForceLnRequest bool
107
+ HttpAllLnRequestSchedulingMethod string
107
108
108
109
HttpAccessLogIsOn bool
109
110
HttpAccessLogEnableRequestHeaders bool
@@ -176,6 +177,7 @@ func (this *IndexAction) RunPost(params struct {
176
177
config .HTTPAll .SupportsLowVersionHTTP = params .HttpAllSupportsLowVersionHTTP
177
178
config .HTTPAll .MatchCertFromAllServers = params .HttpAllMatchCertFromAllServers
178
179
config .HTTPAll .ForceLnRequest = params .HttpAllForceLnRequest
180
+ config .HTTPAll .LnRequestSchedulingMethod = params .HttpAllLnRequestSchedulingMethod
179
181
config .HTTPAll .EnableServerAddrVariable = params .HttpAllEnableServerAddrVariable
180
182
181
183
// 访问日志
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ func (this *IndexAction) RunPost(params struct {
66
66
this .FailField ("requestHeaderName" , "请输入请求报头" )
67
67
return
68
68
}
69
- if ! regexp .MustCompile (`^[\w-_]+$` ).MatchString (remoteAddrConfig .RequestHeaderName ) {
69
+ if ! regexp .MustCompile (`^[\w-_, ]+$` ).MatchString (remoteAddrConfig .RequestHeaderName ) {
70
70
this .FailField ("requestHeaderName" , "请求报头中只能含有数字、英文字母、下划线、中划线" )
71
71
return
72
72
}
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ func (this *IndexAction) RunPost(params struct {
58
58
this .FailField ("requestHeaderName" , "请输入请求报头" )
59
59
return
60
60
}
61
- if ! regexp .MustCompile (`^[\w-_]+$` ).MatchString (remoteAddrConfig .RequestHeaderName ) {
61
+ if ! regexp .MustCompile (`^[\w-_, ]+$` ).MatchString (remoteAddrConfig .RequestHeaderName ) {
62
62
this .FailField ("requestHeaderName" , "请求报头中只能含有数字、英文字母、下划线、中划线" )
63
63
return
64
64
}
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ func (this *IndexAction) RunPost(params struct {
71
71
this .FailField ("requestHeaderName" , "请输入请求报头" )
72
72
return
73
73
}
74
- if ! regexp .MustCompile (`^[\w-_]+$` ).MatchString (remoteAddrConfig .RequestHeaderName ) {
74
+ if ! regexp .MustCompile (`^[\w-_, ]+$` ).MatchString (remoteAddrConfig .RequestHeaderName ) {
75
75
this .FailField ("requestHeaderName" , "请求报头中只能含有数字、英文字母、下划线、中划线" )
76
76
return
77
77
}
Original file line number Diff line number Diff line change @@ -193,6 +193,17 @@ <h4>其他</h4>
193
193
< p class ="comment "> 选中后,所有请求优先发送到L2或者更高级别节点。默认不开启的情况下,只有可以缓存的内容请求才会发送到L2或者更高级别节点。</ p >
194
194
</ td >
195
195
</ tr >
196
+ < tr >
197
+ < td > Ln请求负载均衡方法</ td >
198
+ < td >
199
+ < select class ="ui dropdown auto-width " name ="httpAllLnRequestSchedulingMethod " v-model ="config.httpAll.lnRequestSchedulingMethod ">
200
+ < option value ="urlMapping "> URL映射</ option >
201
+ < option value ="random "> 随机</ option >
202
+ </ select >
203
+ < p class ="comment " v-if ="config.httpAll.lnRequestSchedulingMethod == 'urlMapping' "> 当存在多个Ln节点时,将请求根据URL自动映射到某个固定的Ln节点。</ p >
204
+ < p class ="comment " v-if ="config.httpAll.lnRequestSchedulingMethod == 'random' "> 当存在多个Ln节点时,将请求随机发送到某个Ln节点。</ p >
205
+ </ td >
206
+ </ tr >
196
207
< tr >
197
208
< td > 支持${serverAddr}变量</ td >
198
209
< td >
You can’t perform that action at this time.
0 commit comments