update cache-control header
This commit is contained in:
parent
f0a6374ddd
commit
95768c7dc2
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Reference in New Issue