mirror of
https://github.com/AlistGo/alist.git
synced 2025-06-06 02:21:06 +08:00
feat: add aliyundrive open driver (#3437)
close #3533 close #3521 close #3459 close #3375 * feat: add aliyundrive open driver * feat: adapt alist api * fix: trailing spaces * feat(aliyundrive_open): video preview api
This commit is contained in:
@ -19,9 +19,9 @@ func Init(e *gin.Engine) {
|
||||
c.Redirect(302, conf.URL.Path)
|
||||
})
|
||||
}
|
||||
Cors(e)
|
||||
g := e.Group(conf.URL.Path)
|
||||
common.SecretKey = []byte(conf.Conf.JwtSecret)
|
||||
Cors(g)
|
||||
g.Use(middlewares.StoragesLoaded)
|
||||
if conf.Conf.MaxConnections > 0 {
|
||||
g.Use(middlewares.MaxAllowed(conf.Conf.MaxConnections))
|
||||
@ -133,7 +133,7 @@ func _fs(g *gin.RouterGroup) {
|
||||
g.POST("/add_qbit", handles.AddQbittorrent)
|
||||
}
|
||||
|
||||
func Cors(r *gin.RouterGroup) {
|
||||
func Cors(r *gin.Engine) {
|
||||
config := cors.DefaultConfig()
|
||||
config.AllowAllOrigins = true
|
||||
config.AllowHeaders = []string{"*"}
|
||||
|
Reference in New Issue
Block a user