[SSL证书]免费证书申请增加HTTP认证方式

This commit is contained in:
GoEdgeLab
2020-12-03 18:19:09 +08:00
parent ee553a0234
commit 1fa552a411
9 changed files with 107 additions and 53 deletions

View File

@@ -52,7 +52,12 @@ func checkIPWithoutCache(config *systemconfigs.SecurityConfig, ipAddr string) bo
}
// 本地IP
ip := net.ParseIP(ipAddr).To4()
ipObj := net.ParseIP(ipAddr)
if ipObj == nil {
logs.Println("[USER_MUST_AUTH]invalid client address: " + ipAddr)
return false
}
ip := ipObj.To4()
if ip == nil {
logs.Println("[USER_MUST_AUTH]invalid client address: " + ipAddr)
return false