(c *gin.Context)
| 40 | } |
| 41 | |
| 42 | func CheckSecurity(c *gin.Context) bool { |
| 43 | authService := service.NewIAuthService() |
| 44 | entrance := authService.GetSecurityEntrance() |
| 45 | if entrance != "" && !checkEntrance(c) && !checkSession(c) { |
| 46 | HandleNotSecurity(c, "") |
| 47 | return false |
| 48 | } |
| 49 | if !checkBindDomain(c) { |
| 50 | HandleNotSecurity(c, "err_domain") |
| 51 | return false |
| 52 | } |
| 53 | if !checkIPLimit(c) { |
| 54 | HandleNotSecurity(c, "err_ip_limit") |
| 55 | return false |
| 56 | } |
| 57 | return true |
| 58 | } |
| 59 | |
| 60 | func ToIndexHtml(c *gin.Context) { |
| 61 | c.Writer.Header().Set("Content-Type", "text/html; charset=utf-8") |
nothing calls this directly
no test coverage detected