diff options
author | Yarden Shoham <hrsi88@gmail.com> | 2023-03-08 22:40:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-08 15:40:04 -0500 |
commit | af0468ed8dea62f373c51efaa679080a9cb69f5c (patch) | |
tree | 872b1ecb010503d74236c04e95aa78badba5d9d4 /routers/install | |
parent | 1960ad5c90df65100488b64e7047d1ba3096c11c (diff) | |
download | gitea-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.go | 2 |
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 { |