Merge pull request #339 from prometheus/static-caching

Add caching to static assets when served from blob handler.
This commit is contained in:
juliusv 2013-07-24 10:38:38 -07:00
commit c32dd276df
1 changed files with 1 additions and 0 deletions

View File

@ -61,5 +61,6 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
contentType = mimeMap[parts[len(parts)-1]]
}
w.Header().Set("Content-Type", contentType)
w.Header().Set("Cache-Control", "public, max-age=259200")
w.Write(file)
}