This commit is contained in:
孟帅
2023-05-10 23:54:50 +08:00
parent bbe655a4d8
commit 49a96750bf
314 changed files with 15138 additions and 6244 deletions

View File

@@ -15,6 +15,7 @@ func (s *sMiddleware) Develop(r *ghttp.Request) {
ips := g.Cfg().MustGet(r.Context(), "hggen.allowedIPs").Strings()
if len(ips) == 0 {
response.JsonExit(r, gcode.CodeNotSupported.Code(), "请配置生成白名单!")
return
}
if !gstr.InArray(ips, "*") {
@@ -29,6 +30,7 @@ func (s *sMiddleware) Develop(r *ghttp.Request) {
if !ok {
response.JsonExit(r, gcode.CodeNotSupported.Code(), fmt.Sprintf("当前IP[%s]没有配置生成白名单!", cuIp))
return
}
}