访客IP设置中支持多个请求报头

This commit is contained in:
刘祥超
2023-09-17 19:14:34 +08:00
parent 0c8ae8960d
commit 39f9fa0e6b
5 changed files with 20 additions and 7 deletions

View File

@@ -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
}