fix: malformed cache-control header

This commit is contained in:
 Ilya Atamas
2019-04-23 18:22:06 +03:00
parent 62e64e5154
commit 588ec835df
3 changed files with 5 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ package proxy
import (
"net/http"
"strconv"
"strings"
"time"
@@ -54,7 +55,7 @@ func (proxy Proxy) getPackageHandler(options ServerOptions) gin.HandlerFunc {
if err != nil {
c.AbortWithError(500, err)
} else {
c.Header("Cache-Control", "public, max-age="+string(int(options.DatabaseExpiration.Seconds())))
c.Header("Cache-Control", "public, max-age="+strconv.Itoa(int(options.DatabaseExpiration.Seconds())))
c.Data(200, "application/json", pkg)
}
}