Add local jwt

This commit is contained in:
LinkLeong 2023-05-05 03:37:00 +01:00
parent 705bf1facb
commit 79b1ac8306

View File

@ -41,7 +41,7 @@ func InitV1Router() *gin.Engine {
r.GET("/v1/recover/:type", v1.GetRecoverStorage)
v1Group := r.Group("/v1")
v1Group.Use(jwt.JWT(
v1Group.Use(jwt.ExceptLocalhost(
func() (*ecdsa.PublicKey, error) {
return external.GetPublicKey(config.CommonInfo.RuntimePath)
},