From cf4adc19b165f848714cd6e6e073cea97baf483f Mon Sep 17 00:00:00 2001 From: clsr Date: Sat, 15 Oct 2016 20:09:16 +0200 Subject: Fix Expires header --- api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.go b/api.go index e77cd2a..7df3332 100644 --- a/api.go +++ b/api.go @@ -41,7 +41,7 @@ func handleFile(w http.ResponseWriter, r *http.Request) { } w.Header().Set("X-Content-Type-Options", "nosniff") w.Header().Set("Last-Modified", modtime.UTC().Format(http.TimeFormat)) - w.Header().Set("Expires", modtime.UTC().Add(time.Hour*24*30).Format(http.TimeFormat)) + w.Header().Set("Expires", time.Now().UTC().Add(time.Hour*24*30).Format(http.TimeFormat)) w.Header().Set("Cache-Control", "max-age=2592000") w.Header().Set("ETag", "\"sha1:"+hash+"\"") //io.Copy(w, f) -- cgit