update cache-control header

This commit is contained in:
Dawid Wysokiński 2021-01-08 23:14:13 +01:00
parent f0a6374ddd
commit 95768c7dc2
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ func playgroundHandler() gin.HandlerFunc {
h := playground.Handler("Playground", "/graphql")
return func(c *gin.Context) {
c.Header("Cache-Control", fmt.Sprintf(`public, must-revalidate, max-age=%d, s-maxage=%d`, playgroundTTL, playgroundTTL))
c.Header("Cache-Control", fmt.Sprintf(`public, max-age=%d`, playgroundTTL))
h.ServeHTTP(c.Writer, c.Request)
}
}

View File

@ -41,7 +41,7 @@ func Attach(cfg Config) error {
}
func (h *handler) mapHandler(c *gin.Context) {
c.Header("Cache-Control", fmt.Sprintf(`public, must-revalidate, max-age=%d, s-maxage=%d`, imageTTL, imageTTL))
c.Header("Cache-Control", fmt.Sprintf(`public, max-age=%d`, imageTTL))
server, err := h.serverUsecase.GetByKey(c.Request.Context(), c.Param("server"))
if err != nil {