diff --git a/rule/mw/mw_db.go b/rule/mw/mw_db.go index 5b4d6d3..f1b692b 100644 --- a/rule/mw/mw_db.go +++ b/rule/mw/mw_db.go @@ -38,6 +38,12 @@ func GetMasterId(baseDb *xorm.Engine, c *gin.Context) (masterId string) { masterId = svc.GetWebSiteDomainMasterId(baseDb, md.PLATFORM_PC, c.Request.Host) } } + if masterId == "" && c.GetHeader("Platform") == "" { // 无平台访问 + hostList := strings.Split(c.Request.Host, ".") + if isNumeric(hostList[0]) { + masterId = hostList[0] + } + } } fmt.Println("master_id:::::::", masterId) return