1、新增首页合计详情页;
2、新增索引和缓存;
This commit is contained in:
@@ -9,7 +9,8 @@ import (
|
||||
//
|
||||
// 函数集中注册跨域中间件和 v1 版本接口,调用方只需要注入各业务 Handler。
|
||||
func NewRouter(commonApi *api.CommonHandler, stockApi *api.StockHandler, limitBoardApi *api.LimitBoardHandler) *gin.Engine {
|
||||
r := gin.Default()
|
||||
r := gin.New()
|
||||
r.Use(gin.Recovery())
|
||||
|
||||
// 跨域中间件允许前端从任意来源访问接口,并暴露 CSV 下载需要的 Content-Disposition。
|
||||
r.Use(func(c *gin.Context) {
|
||||
@@ -23,6 +24,7 @@ func NewRouter(commonApi *api.CommonHandler, stockApi *api.StockHandler, limitBo
|
||||
}
|
||||
c.Next()
|
||||
})
|
||||
r.Use(cacheableGETResponseMiddleware(newResponseCacheStore()))
|
||||
|
||||
v1 := r.Group("/api/v1")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user