From 0710723431cc47121cab641237c2e7446405f2b8 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Fri, 25 Oct 2024 23:07:05 +0800 Subject: [PATCH] 1 --- app/router/router.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/router/router.go b/app/router/router.go index 18c06a0..7680163 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -27,7 +27,7 @@ func Init() *gin.Engine { // TODO::指定open的文档的位置 // 设置静态文件服务,提供 group2.json 文件 - r.Static("/api-docs", "./docs") + r.Static("/api/api-docs", "./docs") r.GET("/api/open/swagger/*any", gin.BasicAuth(gin.Accounts{ "zhiYin": "123456", }), func(c *gin.Context) { @@ -36,7 +36,7 @@ func Init() *gin.Engine { requestTls = "https://" } r.Use(mw.SwagAuth()) - ginSwagger.WrapHandler(swaggerFiles.Handler, ginSwagger.URL(requestTls+c.Request.Host+"/api-docs/open.json"))(c) + ginSwagger.WrapHandler(swaggerFiles.Handler, ginSwagger.URL(requestTls+c.Request.Host+"/api/api-docs/open.json"))(c) }) r.Use(mw.ChangeHeader)