From 876ee49fb026f4c0da4d5e0ee132fd75429e67ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E5=87=89?= <927625802@qq.com> Date: Fri, 7 Jan 2022 20:28:58 +0800 Subject: [PATCH] :bug: add range header for pdf.js --- server/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/router.go b/server/router.go index c063c53a..a5c392e8 100644 --- a/server/router.go +++ b/server/router.go @@ -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)) }