diff --git a/README.md b/README.md index dc442739..a88c6df7 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,14 @@ [English](./README-en.md) | 简体中文 -[gitee地址](https://gitee.com/pixelmax/gin-vue-admin) +[gitee地址](https://gitee.com/pixelmax/gin-vue-admin)| [github地址](https://github.com/flipped-aurora/gin-vue-admin) # 项目文档 [在线文档](https://www.gin-vue-admin.com/) : https://www.gin-vue-admin.com/ +[从环境到部署教学视频](https://www.bilibili.com/video/BV1fV411y7dT) + [开发教学](https://www.gin-vue-admin.com/docs/help) (贡献者: LLemonGreen And Fann) - 前端UI框架:[element-ui](https://github.com/ElemeFE/element) - 后台框架:[gin](https://github.com/gin-gonic/gin) diff --git a/server/middleware/cors.go b/server/middleware/cors.go index 91a5ef21..68f6651f 100644 --- a/server/middleware/cors.go +++ b/server/middleware/cors.go @@ -11,7 +11,7 @@ func Cors() gin.HandlerFunc { method := c.Request.Method origin := c.Request.Header.Get("Origin") c.Header("Access-Control-Allow-Origin", origin) - c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization, Token,X-Token,X-User-Id\"") + c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization, Token,X-Token,X-User-Id") c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS,DELETE,PUT") c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type") c.Header("Access-Control-Allow-Credentials", "true") diff --git a/server/middleware/jwt.go b/server/middleware/jwt.go index 6b72c53c..552f6760 100644 --- a/server/middleware/jwt.go +++ b/server/middleware/jwt.go @@ -16,7 +16,7 @@ import ( func JWTAuth() gin.HandlerFunc { return func(c *gin.Context) { - // 我们这里jwt鉴权取头部信息 x-token 登录时回返回token信息 这里前端需要把token存储到cookie或者本地localSstorage中 不过需要跟后端协商过期时间 可以约定刷新令牌或者重新登录 + // 我们这里jwt鉴权取头部信息 x-token 登录时回返回token信息 这里前端需要把token存储到cookie或者本地localStorage中 不过需要跟后端协商过期时间 可以约定刷新令牌或者重新登录 token := c.Request.Header.Get("x-token") if token == "" { response.Result(response.ERROR, gin.H{ @@ -66,7 +66,7 @@ func JWTAuth() gin.HandlerFunc { if err!=nil { global.GVA_LOG.Error("get redis jwt failed", zap.Any("err", err)) }else{ - service.JsonInBlacklist(model.JwtBlacklist{Jwt: RedisJwtToken}) + _ = service.JsonInBlacklist(model.JwtBlacklist{Jwt: RedisJwtToken}) //当之前的取成功时才进行拉黑操作 } // 无论如何都要记录当前的活跃状态 diff --git a/server/resource/template/fe/table.vue.tpl b/server/resource/template/fe/table.vue.tpl index 789b04ac..a184bca3 100644 --- a/server/resource/template/fe/table.vue.tpl +++ b/server/resource/template/fe/table.vue.tpl @@ -67,7 +67,7 @@ {{ end }}