tfstated/pkg/webui/cache.go

11 lines
253 B
Go
Raw Normal View History

package webui
import "net/http"
func cache(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "public, max-age=31536000, immutable")
next.ServeHTTP(w, r)
})
}