Skip to content

Commit

Permalink
Merge pull request #245 from systemli/Fix-duplicated-HTTP-header-for-…
Browse files Browse the repository at this point in the history
…response-cache

🐛 Fix duplicated HTTP header for response cache
  • Loading branch information
0x46616c6b authored Oct 20, 2023
2 parents 94dabfc + a580c4b commit e01a926
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/middleware/response_cache/response_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e01a926

Please sign in to comment.