From a580c4b0374b37f931a7810171907998494a9364 Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 20 Oct 2023 17:08:37 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20duplicated=20HTTP=20header?= =?UTF-8?q?=20for=20response=20cache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/api/middleware/response_cache/response_cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/middleware/response_cache/response_cache.go b/internal/api/middleware/response_cache/response_cache.go index fd4aae61..9657aae2 100644 --- a/internal/api/middleware/response_cache/response_cache.go +++ b/internal/api/middleware/response_cache/response_cache.go @@ -96,7 +96,7 @@ func CachePage(cache *cache.Cache, expires time.Duration, handle gin.HandlerFunc v := value.(responseCache) for k, values := range v.Header { for _, value := range values { - c.Writer.Header().Add(k, value) + c.Writer.Header().Set(k, value) } } c.Writer.WriteHeader(v.Status)