mirror of
https://github.com/gojp/goreportcard.git
synced 2026-01-28 22:39:05 +08:00
add Cache-Control header for assets
This commit is contained in:
@@ -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:])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user