Explorar o código

return on prefix mismatch

Shelikhoo %!s(int64=4) %!d(string=hai) anos
pai
achega
9f8f420ed3
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      app/restful-api/restful-api.go

+ 1 - 0
app/restful-api/restful-api.go

@@ -69,6 +69,7 @@ func (r *restfulService) TokenAuthMiddleware() gin.HandlerFunc {
 		if !strings.HasPrefix(auth, prefix) {
 			c.JSON(http.StatusUnauthorized, "unauthorized")
 			c.Abort()
+			return
 		}
 		auth = strings.TrimPrefix(auth, prefix)
 		if auth != r.config.AuthToken { // tip: Bearer: token123