Skip to content

Commit

Permalink
Set X-Gitea-Debug header once
Browse files Browse the repository at this point in the history
Instead of adding it

Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
  • Loading branch information
yardenshoham committed Mar 7, 2023
1 parent a2f4446 commit af8a1c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/httpcache/httpcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func AddCacheControlToHeader(h http.Header, maxAge time.Duration, additionalDire
directives = append(directives, "max-age=0", "private", "must-revalidate")

// to remind users they are using non-prod setting.
h.Add("X-Gitea-Debug", "RUN_MODE="+setting.RunMode)
h.Set("X-Gitea-Debug", "RUN_MODE="+setting.RunMode)
}

h.Set("Cache-Control", strings.Join(append(directives, additionalDirectives...), ", "))
Expand Down

0 comments on commit af8a1c6

Please # to comment.