Browse Source

add cache-control for attachments

tags/v1.2.0-rc1
Unknwon 10 years ago
parent
commit
1abb7aab9c
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      cmd/web.go

+ 1
- 0
cmd/web.go View File

@@ -345,6 +345,7 @@ func runWeb(ctx *cli.Context) {
}
defer fr.Close()

ctx.Header().Set("Cache-Control", "public,max-age=86400")
// Fix #312. Attachments with , in their name are not handled correctly by Google Chrome.
// We must put the name in " manually.
if err = repo.ServeData(ctx, "\""+attach.Name+"\"", fr); err != nil {


Loading…
Cancel
Save