Do not try to render web app error page when web server is disabled (#10820)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5b252e8736
Коммит
68da625802
@@ -133,11 +133,14 @@ func (a *App) HTMLTemplates() *template.Template {
|
||||
}
|
||||
|
||||
func (a *App) Handle404(w http.ResponseWriter, r *http.Request) {
|
||||
err := model.NewAppError("Handle404", "api.context.404.app_error", nil, "", http.StatusNotFound)
|
||||
|
||||
mlog.Debug(fmt.Sprintf("%v: code=404 ip=%v", r.URL.Path, utils.GetIpAddress(r)))
|
||||
|
||||
utils.RenderWebAppError(a.Config(), w, r, err, a.AsymmetricSigningKey())
|
||||
if *a.Config().ServiceSettings.WebserverMode == "disabled" {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
utils.RenderWebAppError(a.Config(), w, r, model.NewAppError("Handle404", "api.context.404.app_error", nil, "", http.StatusNotFound), a.AsymmetricSigningKey())
|
||||
}
|
||||
|
||||
func (a *App) getSystemInstallDate() (int64, *model.AppError) {
|
||||
|
||||
Ссылка в новой задаче
Block a user