mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-04 02:12:30 +02:00
Refactor HTTP request context (#17979)
This commit is contained in:
parent
9d943bf374
commit
4da1d97810
26 changed files with 139 additions and 177 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue