download_router.go
457 字节
package routers
import (
"github.com/beego/beego/v2/server/web"
"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/port/beego/controllers"
"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/port/beego/middleware"
)
func init() {
web.InsertFilter("/static/*", web.BeforeRouter, middleware.JwtFilter())
web.Router("/static/:filename", &controllers.DownloadFileController{}, "*:DownloadHandle")
}