diff --git a/web/web.go b/web/web.go index d58bf0abe3..1d2199f868 100644 --- a/web/web.go +++ b/web/web.go @@ -61,8 +61,8 @@ func Handle404(a app.AppIface, w http.ResponseWriter, r *http.Request) { err := model.NewAppError("Handle404", "api.context.404.app_error", nil, "", http.StatusNotFound) ipAddress := utils.GetIPAddress(r, a.Config().ServiceSettings.TrustedProxyIPHeader) mlog.Debug("not found handler triggered", mlog.String("path", r.URL.Path), mlog.Int("code", 404), mlog.String("ip", ipAddress)) - if IsAPICall(a, r) { + w.Header().Set("Content-Type", "application/json") w.WriteHeader(err.StatusCode) err.DetailedError = "There doesn't appear to be an api call for the url='" + r.URL.Path + "'. Typo? are you missing a team_id or user_id as part of the url?" w.Write([]byte(err.ToJSON()))