mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-28 03:00:03 +02:00
Set X-Gitea-Debug
header once (#23361)
Instead of adding it # Before On the raw commit page:  # After  Fixes #23308 --------- Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
1960ad5c90
commit
af0468ed8d
6 changed files with 12 additions and 12 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue