mirror of https://github.com/Xhofe/alist
🐛 add range header for pdf.js
parent
10bec31033
commit
876ee49fb0
|
@ -57,6 +57,6 @@ func InitApiRouter(r *gin.Engine) {
|
|||
func Cors(r *gin.Engine) {
|
||||
config := cors.DefaultConfig()
|
||||
config.AllowAllOrigins = true
|
||||
config.AllowHeaders = append(config.AllowHeaders, "Authorization")
|
||||
config.AllowHeaders = append(config.AllowHeaders, "Authorization", "range")
|
||||
r.Use(cors.New(config))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue