This commit is contained in:
Marcel Pociot 2018-11-26 23:06:16 +01:00
parent b9c2f10a27
commit 097be4d2b1
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 that will be applied to the dashboard routes.
*/ */
'middleware' => [ 'middleware' => [
'web',
Authorize::class, Authorize::class,
], ],
], ],

View File

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