From 43cb44f26b28aaaad851a5e74e58e4e765a0d824 Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Wed, 16 Feb 2022 09:09:25 +0800 Subject: [PATCH] no cache when download --- routers/repo/download.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routers/repo/download.go b/routers/repo/download.go index 5b8982102..f1b6e09b7 100755 --- a/routers/repo/download.go +++ b/routers/repo/download.go @@ -28,7 +28,8 @@ func ServeData(ctx *context.Context, name string, reader io.Reader) error { buf = buf[:n] } - ctx.Resp.Header().Set("Cache-Control", "public,max-age=86400") + //ctx.Resp.Header().Set("Cache-Control", "public,max-age=86400") + ctx.Resp.Header().Set("Cache-Control", "max-age=0") name = path.Base(name) // Google Chrome dislike commas in filenames, so let's change it to a space