summaryrefslogtreecommitdiffstats
path: root/routers/install/install.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2021-12-15 14:59:57 +0800
committerGitHub <noreply@github.com>2021-12-15 14:59:57 +0800
commit4da1d9781025aa4a85899b1ddeb25aabbaa82703 (patch)
tree9714f71f2fb042e44d418fbcfc56cd8440a1bbb1 /routers/install/install.go
parent9d943bf374e56e4d403303a6a2caafc1c79cdb6f (diff)
downloadgitea-4da1d9781025aa4a85899b1ddeb25aabbaa82703.tar.gz
gitea-4da1d9781025aa4a85899b1ddeb25aabbaa82703.zip
Refactor HTTP request context (#17979)
Diffstat (limited to 'routers/install/install.go')
-rw-r--r--routers/install/install.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/routers/install/install.go b/routers/install/install.go
index 45804acf3b..7c3d43bbde 100644
--- a/routers/install/install.go
+++ b/routers/install/install.go
@@ -80,9 +80,7 @@ func Init(next http.Handler) http.Handler {
"AllLangs": translation.AllLangs(),
"CurrentURL": setting.AppSubURL + req.URL.RequestURI(),
"PageStartTime": startTime,
- "TmplLoadTimes": func() string {
- return time.Since(startTime).String()
- },
+
"PasswordHashAlgorithms": user_model.AvailableHashAlgorithms,
},
}
@@ -554,7 +552,7 @@ func SubmitInstall(ctx *context.Context) {
ctx.Flash.Success(ctx.Tr("install.install_success"))
- ctx.Header().Add("Refresh", "1; url="+setting.AppURL+"user/login")
+ ctx.RespHeader().Add("Refresh", "1; url="+setting.AppURL+"user/login")
ctx.HTML(http.StatusOK, tplPostInstall)
// Now get the http.Server from this request and shut it down