Skip to content
Permalink
Browse files

Use a sane Etag value vs stringfied Time (#1608)

  • Loading branch information...
hdm authored and paganotoni committed Feb 25, 2019
1 parent ca6410f commit fd3df5fcbe3b4bde4e5fca94aec74579c498308a
Showing with 1 addition and 1 deletion.
  1. +1 −1 route_mappings.go
@@ -110,7 +110,7 @@ func (a *App) fileServer(fs http.FileSystem) http.Handler {

stat, _ := f.Stat()
maxAge := envy.Get(AssetsAgeVarName, "31536000")
w.Header().Add("ETag", fmt.Sprintf("%x", stat.ModTime()))
w.Header().Add("ETag", fmt.Sprintf("%x", stat.ModTime().UnixNano()))
w.Header().Add("Cache-Control", fmt.Sprintf("max-age=%s", maxAge))
fsh.ServeHTTP(w, r)
})

0 comments on commit fd3df5f

Please sign in to comment.
You can’t perform that action at this time.