From 3e4c44c47836400c1578bf5d2c6dbaac7f026494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Fafak?= Date: Thu, 29 Sep 2022 21:18:57 +0300 Subject: [PATCH] Update Header with application/json (#21047) --- web/web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()))