mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +08:00
add no-cache for smart-git
This commit is contained in:
parent
4b37c6bb2b
commit
d231fd839f
1 changed files with 5 additions and 0 deletions
|
|
@ -118,6 +118,11 @@ func GitReq(ctx context.Context, c *app.RequestContext, u string, cfg *config.Co
|
||||||
}
|
}
|
||||||
|
|
||||||
c.Status(resp.StatusCode)
|
c.Status(resp.StatusCode)
|
||||||
|
if cfg.GitClone.Mode == "cache" {
|
||||||
|
c.Response.Header.Set("Cache-Control", "no-store, no-cache, must-revalidate")
|
||||||
|
c.Response.Header.Set("Pragma", "no-cache")
|
||||||
|
c.Response.Header.Set("Expires", "0")
|
||||||
|
}
|
||||||
c.SetBodyStream(resp.Body, -1)
|
c.SetBodyStream(resp.Body, -1)
|
||||||
//err = hwriter.Writer(resp.Body, c)
|
//err = hwriter.Writer(resp.Body, c)
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue