diff options
author | Unknwon <u@gogs.io> | 2015-08-12 04:58:39 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-12 04:58:39 +0800 |
commit | b410207dc1f624f9c14a90de97b22634667d762e (patch) | |
tree | 5851099b20624a3a7c36af28581bfb5ef4a60c00 | |
parent | e67659bf8e76763bdfdfe02d87359255b7acd19b (diff) |
add cache-control for attachments
-rw-r--r-- | cmd/web.go | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 { |