Merge branch 'master' of github.com:beyondcode/laravel-websockets

This commit is contained in:
freek 2018-11-26 23:15:47 +01:00
commit ad97ca506a
2 changed files with 8 additions and 0 deletions

View File

@ -40,6 +40,7 @@ return [
* Middleware that will be applied to the dashboard routes.
*/
'middleware' => [
'web',
Authorize::class,
],
],

View File

@ -105,7 +105,13 @@
this.pusher = new Pusher(this.client.appKey, {
wsHost: window.location.hostname,
wsPort: this.port,
disableStats: true,
authEndpoint: '{{ config('websockets.dashboard.path') }}/auth',
auth: {
headers: {
'X-CSRF-Token': "{{ csrf_token() }}"
}
},
enabledTransports: ['ws', 'flash']
});
@ -166,6 +172,7 @@
sendEvent() {
$.post('{{ config('websockets.dashboard.path') }}/event', {
_token: '{{ csrf_token() }}',
key: this.client.appKey,
secret: this.client.appSecret,
appId: this.client.appId,