1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-10 19:48:19 +00:00

Set X-Gitea-Debug header once (#23361) (#23381)

This commit is contained in:
Giteabot
2023-03-08 17:33:05 -05:00
committed by GitHub
parent 54c674c936
commit 87c31c2ffe
6 changed files with 12 additions and 12 deletions

View File

@@ -17,7 +17,7 @@ func cacheableRedirect(ctx *context.Context, location string) {
// here we should not use `setting.StaticCacheTime`, it is pretty long (default: 6 hours)
// we must make sure the redirection cache time is short enough, otherwise a user won't see the updated avatar in 6 hours
// it's OK to make the cache time short, it is only a redirection, and doesn't cost much to make a new request
httpcache.AddCacheControlToHeader(ctx.Resp.Header(), 5*time.Minute)
httpcache.SetCacheControlInHeader(ctx.Resp.Header(), 5*time.Minute)
ctx.Redirect(location)
}