From 81f83e1c4299d06f99f9c6b51ca571c8aea70876 Mon Sep 17 00:00:00 2001 From: Shawn Smith Date: Sat, 21 Oct 2017 08:08:12 +0900 Subject: [PATCH] add Cache-Control header for assets --- handlers/assets.go | 1 + 1 file changed, 1 insertion(+) diff --git a/handlers/assets.go b/handlers/assets.go index 5cd2b71..34c1a63 100644 --- a/handlers/assets.go +++ b/handlers/assets.go @@ -8,6 +8,7 @@ import ( // AssetsHandler handles serving static files func AssetsHandler(w http.ResponseWriter, r *http.Request) { log.Println("Serving " + r.URL.Path[1:]) + w.Header().Set("Cache-Control", "max-age=86400") http.ServeFile(w, r, r.URL.Path[1:]) }