1
0
Fork 0
mirror of https://github.com/vbatts/imgsrv.git synced 2024-11-30 12:05:42 +00:00

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 ( import (
"flag" "flag"
"fmt" "fmt"
"github.com/vbatts/imgsrv/config"
"github.com/vbatts/imgsrv/client" "github.com/vbatts/imgsrv/client"
"github.com/vbatts/imgsrv/config"
"github.com/vbatts/imgsrv/util" "github.com/vbatts/imgsrv/util"
"labix.org/v2/mgo" "labix.org/v2/mgo"
"log" "log"

View file

@ -720,6 +720,7 @@ func routeAssets(w http.ResponseWriter, r *http.Request) {
switch path { switch path {
case "bootstrap.css": case "bootstrap.css":
fmt.Fprint(w, bootstrapCSS) fmt.Fprint(w, bootstrapCSS)
w.Header().Set("Cache-Control", "max-age=315360000")
w.Header().Set("Content-Type", "text/css") w.Header().Set("Content-Type", "text/css")
} }
} }