blob: 3d31c2524c4d57a2155646339e566a720f53cff8 [file] [log] [blame]
package server
import (
"net/http"
)
type cachingHandler struct {
h http.Handler
}
func NewCachingHandler(h http.Handler) http.Handler {
return cachingHandler{h}
}
func (h cachingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "max-age=604800")
h.h.ServeHTTP(w, r)
}