feat: file proxy handle

This commit is contained in:
Noah Hsu
2022-06-28 21:58:46 +08:00
parent d1efec4539
commit 96380a50da
11 changed files with 167 additions and 90 deletions

View File

@ -13,7 +13,8 @@ func Init(r *gin.Engine) {
common.SecretKey = []byte(conf.Conf.JwtSecret)
Cors(r)
r.GET("/d/*path", controllers.Down)
r.GET("/d/*path", middlewares.Down, controllers.Down)
r.GET("/p/*path", middlewares.Down, controllers.Proxy)
api := r.Group("/api", middlewares.Auth)
api.POST("/auth/login", controllers.Login)