This commit is contained in:
suyl
2021-07-19 18:44:29 +08:00
parent c31499ddb7
commit 7c952f112f
4 changed files with 20 additions and 13 deletions

View File

@@ -33,6 +33,7 @@ func checkToken(c *gin.Context) (tokenInfo *model.TokenInfo) {
//验证token
//v2下的接口需要验证v1不需要
if !strings.Contains(c.Request.URL.String(), "v1") {
globals.SugarLogger.Debugf("checkToken cookie: %v", utils.Format4Output(c.Request.Cookies(), true))
if cookie, err = c.Request.Cookie("token"); err != nil {
c.JSON(http.StatusOK, &CallBack{
Desc: err.Error(),