(c *gin.Context)
| 20 | var publicSharePagePattern = regexp.MustCompile(`^/s/[A-Za-z0-9]{10,16}$`) |
| 21 | |
| 22 | func HandleNotRoute(c *gin.Context) bool { |
| 23 | if !checkBindDomain(c) { |
| 24 | HandleNotSecurity(c, "err_domain") |
| 25 | return false |
| 26 | } |
| 27 | if !checkIPLimit(c) { |
| 28 | HandleNotSecurity(c, "err_ip_limit") |
| 29 | return false |
| 30 | } |
| 31 | if CanServeFrontendPath(c) { |
| 32 | ToIndexHtml(c) |
| 33 | return false |
| 34 | } |
| 35 | if isEntrancePath(c) { |
| 36 | ToIndexHtml(c) |
| 37 | return false |
| 38 | } |
| 39 | return true |
| 40 | } |
| 41 | |
| 42 | func CheckSecurity(c *gin.Context) bool { |
| 43 | authService := service.NewIAuthService() |
nothing calls this directly
no test coverage detected