Browse Source

no cache when download

pull/1502/head
lewis 3 years ago
parent
commit
43cb44f26b
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] 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) name = path.Base(name)


// Google Chrome dislike commas in filenames, so let's change it to a space // Google Chrome dislike commas in filenames, so let's change it to a space


Loading…
Cancel
Save