mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-12-09 01:36:07 +08:00
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user