Closed paxha closed 4 years ago
i am getting cross site issue in local machine as well as production server.
due to this warnings i am not getting notifications
this is my pusher configuration code
var pusher = new Pusher('{{ config('broadcasting.connections.pusher.key') }}', { cluster: '{{ config('broadcasting.connections.pusher.options.cluster') }}', encrypted: true, authEndpoint: '/broadcasting/auth', auth: { headers: { 'X-CSRF-Token': '{{ csrf_token() }}', // CSRF token } } });
var channel = pusher.subscribe('private-user.' + '{{ auth()->user()->id }}');
channel.bind('App\Events\NewNotificationEvent', function (data) { toastr.success(data.notification.message, data.notification.heading); });
Indeed. This is a duplicate. Thanks for mentioning that @volkanmetin
i am getting cross site issue in local machine as well as production server.
due to this warnings i am not getting notifications
this is my pusher configuration code
var pusher = new Pusher('{{ config('broadcasting.connections.pusher.key') }}', { cluster: '{{ config('broadcasting.connections.pusher.options.cluster') }}', encrypted: true, authEndpoint: '/broadcasting/auth', auth: { headers: { 'X-CSRF-Token': '{{ csrf_token() }}', // CSRF token } } });
var channel = pusher.subscribe('private-user.' + '{{ auth()->user()->id }}');
channel.bind('App\Events\NewNotificationEvent', function (data) { toastr.success(data.notification.message, data.notification.heading); });