Skip to content

Commit be5124a

Browse files
committed
update(nginx) 端口转发支持域名#87 #58
只支持IP地址的方式。改成支持域名+IP地址的方式
1 parent ebfc2e7 commit be5124a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/nginx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ func (n *Nginx) AddTcpLoadBalance(request *http.Request) core.Response {
10871087
if !validate.IsPort(m["node_port"].(string)) {
10881088
return core.Fail("目标端口不正确")
10891089
}
1090-
if !public.IsIpAddr(m["node_address"].(string)) {
1090+
if !validate.IsHost(m["node_address"].(string)) {
10911091
return core.Fail("目标主机地址不正确")
10921092
}
10931093
if _, err := strconv.Atoi(m["node_weight"].(string)); err != nil {

0 commit comments

Comments
 (0)