rdluck 4 лет назад
Родитель
Сommit
7b3f69d813
1 измененных файлов с 7 добавлено и 6 удалено
  1. 7 6
      controllers/base_auth.go

+ 7 - 6
controllers/base_auth.go

@@ -33,12 +33,13 @@ func (this *BaseAuthController) Prepare() {
 	if method != "HEAD" {
 		if method == "POST" || method == "GET" {
 			authorization := this.Ctx.Input.Header("Authorization")
-			cookie := this.Ctx.GetCookie("rddp_access_token")
-			utils.FileLog.Info("authorization:%s,cookie:%s", authorization, cookie)
-			if authorization == "" {
-				authorization = cookie
-			}
-			fmt.Println("authorization:", authorization)
+			utils.FileLog.Info("authorization:%s,cookie:%s", authorization)
+			//cookie := this.Ctx.GetCookie("rddp_access_token")
+			//utils.FileLog.Info("authorization:%s,cookie:%s", authorization, cookie)
+			//if authorization == "" {
+			//	authorization = cookie
+			//}
+			//fmt.Println("authorization:", authorization)
 			if authorization == "" {
 				this.JSON(models.BaseResponse{Ret: 408, Msg: "请重新授权!", ErrMsg: "请重新授权:Token is empty or account is empty"}, false, false)
 				this.StopRun()