(c *gin.Context)
| 176 | } |
| 177 | |
| 178 | func checkBindDomain(c *gin.Context) bool { |
| 179 | settingRepo := repo.NewISettingRepo() |
| 180 | status, _ := settingRepo.Get(repo.WithByKey("BindDomain")) |
| 181 | if len(status.Value) == 0 { |
| 182 | return true |
| 183 | } |
| 184 | domains := c.Request.Host |
| 185 | parts := strings.Split(c.Request.Host, ":") |
| 186 | if len(parts) > 0 { |
| 187 | domains = parts[0] |
| 188 | } |
| 189 | return domains == status.Value |
| 190 | } |
| 191 | |
| 192 | func checkIPLimit(c *gin.Context) bool { |
| 193 | settingRepo := repo.NewISettingRepo() |
no test coverage detected