diff options
Diffstat (limited to 'api/context.go')
-rw-r--r-- | api/context.go | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/api/context.go b/api/context.go index 9a276a1a1..f123d8702 100644 --- a/api/context.go +++ b/api/context.go @@ -456,18 +456,13 @@ func IsPrivateIpAddress(ipAddress string) bool { } func RenderWebError(err *model.AppError, w http.ResponseWriter, r *http.Request) { - - protocol := GetProtocol(r) - SiteURL := protocol + "://" + r.Host - - m := make(map[string]string) - m["Message"] = err.Message - m["Details"] = err.DetailedError - m["SiteName"] = utils.Cfg.TeamSettings.SiteName - m["SiteURL"] = SiteURL + props := make(map[string]string) + props["Message"] = err.Message + props["Details"] = err.DetailedError + props["SiteURL"] = GetProtocol(r) + "://" + r.Host w.WriteHeader(err.StatusCode) - ServerTemplates.ExecuteTemplate(w, "error.html", m) + ServerTemplates.ExecuteTemplate(w, "error.html", Page{Props: props, ClientProps: utils.ClientProperties}) } func Handle404(w http.ResponseWriter, r *http.Request) { |