diff --git a/backend/init/router/router.go b/backend/init/router/router.go index e1c4eae89..d7de8d04c 100644 --- a/backend/init/router/router.go +++ b/backend/init/router/router.go @@ -175,7 +175,7 @@ func Routers() *gin.Engine { swaggerRouter := Router.Group("1panel") docs.SwaggerInfo.BasePath = "/api/v1" - swaggerRouter.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerfiles.Handler)) + swaggerRouter.Use(middleware.JwtAuth()).Use(middleware.SessionAuth()).GET("/swagger/*any", ginSwagger.WrapHandler(swaggerfiles.Handler)) PublicGroup := Router.Group("") { PublicGroup.GET("/health", func(c *gin.Context) {