From 6b48dbe231cf1a793b2071cf8e4c751d13f5abad Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Wed, 1 Jul 2015 12:30:46 -0700 Subject: Added two possible options for removing blue bar error, will choose one later --- api/user.go | 2 +- web/react/utils/client.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/user.go b/api/user.go index 292d2b61b..7aad23ab6 100644 --- a/api/user.go +++ b/api/user.go @@ -469,7 +469,7 @@ func getMe(c *Context, w http.ResponseWriter, r *http.Request) { } else { result.Data.(*model.User).Sanitize(map[string]bool{}) w.Header().Set(model.HEADER_ETAG_SERVER, result.Data.(*model.User).Etag()) - w.Header().Set("Expires", "-1") + w.Header().Set("Cache-Control", "max-age=0, public") // should refresh w.Write([]byte(result.Data.(*model.User).ToJson())) return } diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index a43e4eec5..dd835e863 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -287,7 +287,7 @@ module.exports.getMeSynchronous = function(success, error) { if (success) success(data, textStatus, xhr); }, error: function(xhr, status, err) { - if (error) { + if (xhr.status != 200 && error) { e = handleError("getMeSynchronous", xhr, status, err); error(e); }; -- cgit v1.2.3-1-g7c22