aboutsummaryrefslogtreecommitdiff
path: root/internal/cache_headers.go
blob: b756e71943213404af92da6edf39bfbf00b8ab5d (plain)
1
2
3
4
5
6
7
8
9
10
package internal

import "net/http"

func CacheHeader(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		w.Header().Add("Cache-Control", "max-age=600, public")
		next.ServeHTTP(w, r)
	})
}