From a3ba8b3afdf6048f216aab1756460f2163d4b363 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Mon, 5 Aug 2013 16:14:37 -0400 Subject: [PATCH] cache-control for css --- imgsrv.go | 2 +- server.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/imgsrv.go b/imgsrv.go index 90f8294..39b0ccd 100644 --- a/imgsrv.go +++ b/imgsrv.go @@ -10,8 +10,8 @@ package main import ( "flag" "fmt" - "github.com/vbatts/imgsrv/config" "github.com/vbatts/imgsrv/client" + "github.com/vbatts/imgsrv/config" "github.com/vbatts/imgsrv/util" "labix.org/v2/mgo" "log" diff --git a/server.go b/server.go index 2e7cb79..4c31d6e 100644 --- a/server.go +++ b/server.go @@ -720,6 +720,7 @@ func routeAssets(w http.ResponseWriter, r *http.Request) { switch path { case "bootstrap.css": fmt.Fprint(w, bootstrapCSS) + w.Header().Set("Cache-Control", "max-age=315360000") w.Header().Set("Content-Type", "text/css") } }