cache-control for css

This commit is contained in:
Vincent Batts 2013-08-05 16:14:37 -04:00
parent 1e2c4bf3a3
commit a3ba8b3afd
2 changed files with 2 additions and 1 deletions

View File

@ -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"

View File

@ -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")
}
}