CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.
update check version
[email protected]bd85cda9faae
diff --git a/pkg/utils/jwt/jwt_helper.go b/pkg/utils/jwt/jwt_helper.goindex 66133ae..5e98833 100644--- a/pkg/utils/jwt/jwt_helper.go+++ b/pkg/utils/jwt/jwt_helper.go@@ -2,7 +2,7 @@* @Author: LinkLeong [email protected]* @Date: 2022-06-17 14:01:25* @LastEditors: LinkLeong- * @LastEditTime: 2022-07-29 16:14:33+ * @LastEditTime: 2022-07-29 16:22:25* @FilePath: /CasaOS/pkg/utils/jwt/jwt_helper.go* @Description:* @Website: https://www.casaos.io@@ -38,7 +38,7 @@ func JWT() gin.HandlerFunc {//_, err := ParseToken(token)if err != nil {code = common_err.ERROR_AUTH_TOKEN- } else if (c.Request.URL.Path == "/v1/file" || c.Request.URL.Path == "/v1/sys/version/check" || c.Request.URL.Path == "/v1/image" || c.Request.URL.Path == "/v1/file/upload" || c.Request.URL.Path == "/v1/batch") && claims.VerifyIssuer("casaos", true) {+ } else if (c.Request.URL.Path == "/v1/file" || c.Request.URL.Path == "/v1/image" || c.Request.URL.Path == "/v1/file/upload" || c.Request.URL.Path == "/v1/batch") && claims.VerifyIssuer("casaos", true) {//Special treatment} else if !claims.VerifyExpiresAt(time.Now(), true) || !claims.VerifyIssuer("casaos", true) {code = common_err.ERROR_AUTH_TOKENdiff --git a/route/route.go b/route/route.goindex 0274e7c..b6dd35a 100644--- a/route/route.go+++ b/route/route.go@@ -44,6 +44,7 @@ func InitRouter() *gin.Engine {r.GET("/v1/sys/debug", v1.GetSystemConfigDebug) // //debugr.GET("/v1/sys/socket-port", v1.GetSystemSocketPort) //sys/socket_port+ r.GET("/v1/sys/version/check", v1.GetSystemCheckVersion)v1Group := r.Group("/v1")@@ -113,7 +114,7 @@ func InitRouter() *gin.Engine {v1SysGroup.Use(){v1SysGroup.GET("/version", v1.GetSystemCheckVersion) //version/check- v1SysGroup.GET("/version/check", v1.GetSystemCheckVersion)+v1SysGroup.POST("/update", v1.SystemUpdate)v1SysGroup.GET("/hardware", v1.GetSystemHardwareInfo) //hardware/info