summaryrefslogtreecommitdiffstats
path: root/routers/install
diff options
context:
space:
mode:
authorYarden Shoham <hrsi88@gmail.com>2023-03-08 22:40:04 +0200
committerGitHub <noreply@github.com>2023-03-08 15:40:04 -0500
commitaf0468ed8dea62f373c51efaa679080a9cb69f5c (patch)
tree872b1ecb010503d74236c04e95aa78badba5d9d4 /routers/install
parent1960ad5c90df65100488b64e7047d1ba3096c11c (diff)
downloadgitea-af0468ed8dea62f373c51efaa679080a9cb69f5c.tar.gz
gitea-af0468ed8dea62f373c51efaa679080a9cb69f5c.zip
Set `X-Gitea-Debug` header once (#23361)
Instead of adding it # Before On the raw commit page: ![image](https://user-images.githubusercontent.com/20454870/223470744-cdf11898-e023-4198-8c8b-c294e5d78b73.png) # After ![image](https://user-images.githubusercontent.com/20454870/223470596-af898d66-bd5b-4ddb-b220-ceb1f149bfec.png) 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>
Diffstat (limited to 'routers/install')
-rw-r--r--routers/install/routes.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/install/routes.go b/routers/install/routes.go
index a8efc92fe1..82d9c34b41 100644
--- a/routers/install/routes.go
+++ b/routers/install/routes.go
@@ -64,7 +64,7 @@ func installRecovery(ctx goctx.Context) func(next http.Handler) http.Handler {
"SignedUserName": "",
}
- httpcache.AddCacheControlToHeader(w.Header(), 0, "no-transform")
+ httpcache.SetCacheControlInHeader(w.Header(), 0, "no-transform")
w.Header().Set(`X-Frame-Options`, setting.CORSConfig.XFrameOptions)
if !setting.IsProd {