From 933578ca07c4560a28c7a1bda5b4f5934b1fbb8d Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Thu, 2 Jul 2015 08:50:15 -0700 Subject: Removed option that does not work --- api/user.go | 2 +- web/react/utils/client.jsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/user.go b/api/user.go index 7aad23ab6..292d2b61b 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("Cache-Control", "max-age=0, public") // should refresh + w.Header().Set("Expires", "-1") w.Write([]byte(result.Data.(*model.User).ToJson())) return } diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index dd835e863..4433df5cf 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -280,14 +280,14 @@ module.exports.getMeSynchronous = function(success, error) { url: "/api/v1/users/me", dataType: 'json', contentType: 'application/json', - cache: false, + //cache: false, type: 'GET', success: function(data, textStatus, xhr) { current_user = data; if (success) success(data, textStatus, xhr); }, error: function(xhr, status, err) { - if (xhr.status != 200 && error) { + if (/*xhr.status != 200 && */error) { e = handleError("getMeSynchronous", xhr, status, err); error(e); }; -- cgit v1.2.3-1-g7c22