[BRANDING] add X-Forgejo-* headers

(cherry picked from commit 0a3388f93f)
This commit is contained in:
Earl Warren 2023-01-14 08:16:30 +01:00 committed by Loïc Dachary
parent 62cae8cc6a
commit 7eba0a440a
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2
6 changed files with 25 additions and 2 deletions

View file

@ -32,6 +32,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...), ", "))