1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Refactor HTTP request context (#17979)

This commit is contained in:
wxiaoguang
2021-12-15 14:59:57 +08:00
committed by GitHub
parent 9d943bf374
commit 4da1d97810
26 changed files with 139 additions and 177 deletions

View File

@@ -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