diff --git a/src/kibana/index.js b/src/kibana/index.js index 2b818474a569e..9b8e87a0843f5 100644 --- a/src/kibana/index.js +++ b/src/kibana/index.js @@ -69,8 +69,8 @@ define(function (require) { }); RestangularProvider.addResponseInterceptor(function(data, operation, what, url, response, deferred) { if (data && data.status === 'success') { - if (data.token) { - localStorage.setItem('token', data.token); + if (response.headers('Token')) { + localStorage.setItem('token', response.headers('Token')); } return data.data; } else {