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 /cmd | |
parent | e67659bf8e76763bdfdfe02d87359255b7acd19b (diff) | |
download | gitea-b410207dc1f624f9c14a90de97b22634667d762e.tar.gz gitea-b410207dc1f624f9c14a90de97b22634667d762e.zip |
add cache-control for attachments
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/web.go b/cmd/web.go index 6ca771e230..62fb9187ab 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -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 { |