Browse Source

Merge pull request 'no cache when download' (#1502) from fix-1497 into V20220228

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1502
Reviewed-by: ychao_1983 <ychao_1983@sina.com>
pull/1506/head
ychao_1983 3 years ago
parent
commit
d44c9c1da2
1 changed files with 2 additions and 1 deletions
  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