Skip to content

Commit 3f80de1

Browse files
committed
Send Cache-Control header in file responses
1 parent 240b46f commit 3f80de1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ func (s *Server) serveFile(w http.ResponseWriter, r *http.Request) {
278278
if ttype != "" {
279279
w.Header().Set("Content-Type", ttype)
280280
}
281+
w.Header().Set("Cache-Control", "public, immutable, max-age=31536000")
281282
w.WriteHeader(http.StatusOK)
282283
_, err = io.Copy(w, reader)
283284
if err != nil {

0 commit comments

Comments
 (0)