[BRANDING] add X-Forgejo-* headers

This commit is contained in:
Earl Warren 2023-01-14 08:16:30 +01:00 committed by Loïc Dachary
commit de86c5e6ef
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2
6 changed files with 25 additions and 2 deletions

View file

@ -31,6 +31,7 @@ func AddCacheControlToHeader(h http.Header, maxAge time.Duration, additionalDire
// to remind users they are using non-prod setting.
h.Add("X-Gitea-Debug", "RUN_MODE="+setting.RunMode)
h.Add("X-Forgejo-Debug", "RUN_MODE="+setting.RunMode)
}
h.Set("Cache-Control", strings.Join(append(directives, additionalDirectives...), ", "))