Browse Source

update

master
dengbiao 5 months ago
parent
commit
5ccfecde99
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      rule/mw/mw_db.go

+ 6
- 0
rule/mw/mw_db.go View File

@@ -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


Loading…
Cancel
Save