#1502 no cache when download

Merged
ychao_1983 merged 2 commits from fix-1497 into V20220228 2 years ago
  1. +2
    -1
      routers/repo/download.go

+ 2
- 1
routers/repo/download.go View File

@@ -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


Loading…
Cancel
Save