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 {
100100 HttpAllNodeIPShowPage bool
101101 HttpAllEnableServerAddrVariable bool
102102
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
107108
108109 HttpAccessLogIsOn bool
109110 HttpAccessLogEnableRequestHeaders bool
@@ -176,6 +177,7 @@ func (this *IndexAction) RunPost(params struct {
176177 config .HTTPAll .SupportsLowVersionHTTP = params .HttpAllSupportsLowVersionHTTP
177178 config .HTTPAll .MatchCertFromAllServers = params .HttpAllMatchCertFromAllServers
178179 config .HTTPAll .ForceLnRequest = params .HttpAllForceLnRequest
180+ config .HTTPAll .LnRequestSchedulingMethod = params .HttpAllLnRequestSchedulingMethod
179181 config .HTTPAll .EnableServerAddrVariable = params .HttpAllEnableServerAddrVariable
180182
181183 // 访问日志
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ func (this *IndexAction) RunPost(params struct {
6666 this .FailField ("requestHeaderName" , "请输入请求报头" )
6767 return
6868 }
69- if ! regexp .MustCompile (`^[\w-_]+$` ).MatchString (remoteAddrConfig .RequestHeaderName ) {
69+ if ! regexp .MustCompile (`^[\w-_, ]+$` ).MatchString (remoteAddrConfig .RequestHeaderName ) {
7070 this .FailField ("requestHeaderName" , "请求报头中只能含有数字、英文字母、下划线、中划线" )
7171 return
7272 }
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ func (this *IndexAction) RunPost(params struct {
5858 this .FailField ("requestHeaderName" , "请输入请求报头" )
5959 return
6060 }
61- if ! regexp .MustCompile (`^[\w-_]+$` ).MatchString (remoteAddrConfig .RequestHeaderName ) {
61+ if ! regexp .MustCompile (`^[\w-_, ]+$` ).MatchString (remoteAddrConfig .RequestHeaderName ) {
6262 this .FailField ("requestHeaderName" , "请求报头中只能含有数字、英文字母、下划线、中划线" )
6363 return
6464 }
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ func (this *IndexAction) RunPost(params struct {
7171 this .FailField ("requestHeaderName" , "请输入请求报头" )
7272 return
7373 }
74- if ! regexp .MustCompile (`^[\w-_]+$` ).MatchString (remoteAddrConfig .RequestHeaderName ) {
74+ if ! regexp .MustCompile (`^[\w-_, ]+$` ).MatchString (remoteAddrConfig .RequestHeaderName ) {
7575 this .FailField ("requestHeaderName" , "请求报头中只能含有数字、英文字母、下划线、中划线" )
7676 return
7777 }
Original file line number Diff line number Diff line change @@ -193,6 +193,17 @@ <h4>其他</h4>
193193 < p class ="comment "> 选中后,所有请求优先发送到L2或者更高级别节点。默认不开启的情况下,只有可以缓存的内容请求才会发送到L2或者更高级别节点。</ p >
194194 </ td >
195195 </ 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 >
196207 < tr >
197208 < td > 支持${serverAddr}变量</ td >
198209 < td >
You can’t perform that action at this time.
0 commit comments