mirror of
https://github.com/AlistGo/alist.git
synced 2025-06-06 02:21:06 +08:00
fix: check password while upload (close #2444)
This commit is contained in:
@ -119,8 +119,8 @@ func _fs(g *gin.RouterGroup) {
|
||||
g.POST("/move", handles.FsMove)
|
||||
g.POST("/copy", handles.FsCopy)
|
||||
g.POST("/remove", handles.FsRemove)
|
||||
g.PUT("/put", handles.FsStream)
|
||||
g.PUT("/form", handles.FsForm)
|
||||
g.PUT("/put", middlewares.FsUp, handles.FsStream)
|
||||
g.PUT("/form", middlewares.FsUp, handles.FsForm)
|
||||
g.POST("/link", middlewares.AuthAdmin, handles.Link)
|
||||
g.POST("/add_aria2", handles.AddAria2)
|
||||
}
|
||||
@ -128,6 +128,6 @@ func _fs(g *gin.RouterGroup) {
|
||||
func Cors(r *gin.Engine) {
|
||||
config := cors.DefaultConfig()
|
||||
config.AllowAllOrigins = true
|
||||
config.AllowHeaders = append(config.AllowHeaders, "Authorization", "range", "File-Path", "As-Task")
|
||||
config.AllowHeaders = append(config.AllowHeaders, "Authorization", "range", "File-Path", "As-Task", "Password")
|
||||
r.Use(cors.New(config))
|
||||
}
|
||||
|
Reference in New Issue
Block a user