laravel-echo
Advanced tools
Comparing version 0.0.26 to 0.0.27
@@ -474,2 +474,5 @@ var classCallCheck = function (instance, Constructor) { | ||
this.options = options; | ||
if (Vue && Vue.http) { | ||
this.registerVueRequestInterceptor(); | ||
} | ||
if (this.options.connector == 'pusher') { | ||
@@ -483,2 +486,14 @@ this.connector = new PusherConnector(this.options); | ||
createClass(Echo, [{ | ||
key: 'registerVueRequestInterceptor', | ||
value: function registerVueRequestInterceptor() { | ||
var _this = this; | ||
Vue.http.interceptors.push(function (request, next) { | ||
if (_this.socketId()) { | ||
request.headers['X-Socket-ID'] = _this.socketId(); | ||
} | ||
next(); | ||
}); | ||
} | ||
}, { | ||
key: 'listen', | ||
@@ -485,0 +500,0 @@ value: function listen(channel, event, callback) { |
{ | ||
"name": "laravel-echo", | ||
"version": "0.0.26", | ||
"version": "0.0.27", | ||
"description": "Laravel Echo library for beautiful Pusher integration", | ||
@@ -5,0 +5,0 @@ "main": "dist/echo.js", |
121843
2763