From fa3a0df2b63d3f1bbbad44bf20afa48fed42aa06 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 20 Oct 2015 04:37:51 -0700 Subject: Adding multi-session cookie --- web/react/utils/client.jsx | 16 ++++++++-------- web/templates/head.html | 17 ++++++++++------- web/web.go | 36 ++++++------------------------------ 3 files changed, 24 insertions(+), 45 deletions(-) (limited to 'web') diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index ee1f9ad27..fab0640fb 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -48,14 +48,14 @@ function handleError(methodName, xhr, status, err) { track('api', 'api_weberror', methodName, 'message', msg); - if (xhr.status === 401) { - if (window.location.href.indexOf('/channels') === 0) { - window.location.pathname = '/login?redirect=' + encodeURIComponent(window.location.pathname + window.location.search); - } else { - var teamURL = window.location.href.split('/channels')[0]; - window.location.href = teamURL + '/login?redirect=' + encodeURIComponent(window.location.pathname + window.location.search); - } - } + // if (xhr.status === 401) { + // if (window.location.href.indexOf('/channels') === 0) { + // window.location.pathname = '/login?redirect=' + encodeURIComponent(window.location.pathname + window.location.search); + // } else { + // var teamURL = window.location.href.split('/channels')[0]; + // window.location.href = teamURL + '/login?redirect=' + encodeURIComponent(window.location.pathname + window.location.search); + // } + // } return e; } diff --git a/web/templates/head.html b/web/templates/head.html index 31a3c97f2..731bcd691 100644 --- a/web/templates/head.html +++ b/web/templates/head.html @@ -18,13 +18,6 @@ - - @@ -46,6 +39,16 @@ + +