dengbiao 1 week ago
parent
commit
0710723431
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/router/router.go

+ 2
- 2
app/router/router.go View File

@@ -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)



Loading…
Cancel
Save