wip
This commit is contained in:
parent
c1cd4a520e
commit
7270553c2a
|
|
@ -106,7 +106,7 @@
|
||||||
wsHost: window.location.hostname,
|
wsHost: window.location.hostname,
|
||||||
wsPort: this.port,
|
wsPort: this.port,
|
||||||
disableStats: true,
|
disableStats: true,
|
||||||
authEndpoint: '{{ config('websockets.dashboard.path') }}/auth',
|
authEndpoint: '/{{ request()->path() }}/auth',
|
||||||
auth: {
|
auth: {
|
||||||
headers: {
|
headers: {
|
||||||
'X-CSRF-Token': "{{ csrf_token() }}"
|
'X-CSRF-Token': "{{ csrf_token() }}"
|
||||||
|
|
@ -171,7 +171,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
sendEvent() {
|
sendEvent() {
|
||||||
$.post('{{ config('websockets.dashboard.path') }}/event', {
|
$.post('/{{ request()->path() }}/event', {
|
||||||
_token: '{{ csrf_token() }}',
|
_token: '{{ csrf_token() }}',
|
||||||
key: this.client.appKey,
|
key: this.client.appKey,
|
||||||
secret: this.client.appSecret,
|
secret: this.client.appSecret,
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class WebSocketsServiceProvider extends ServiceProvider
|
||||||
|
|
||||||
protected function registerRouteMacro()
|
protected function registerRouteMacro()
|
||||||
{
|
{
|
||||||
Route::macro('websocketsDashboard', function($prefix = 'websockets') {
|
Route::macro('webSocketsDashboard', function($prefix = 'websockets') {
|
||||||
Route::prefix($prefix)->namespace('\\')->middleware(Authorize::class)->group(function() {
|
Route::prefix($prefix)->namespace('\\')->middleware(Authorize::class)->group(function() {
|
||||||
Route::get('/', ShowDashboard::class);
|
Route::get('/', ShowDashboard::class);
|
||||||
Route::post('auth', AuthenticateDashboard::class);
|
Route::post('auth', AuthenticateDashboard::class);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue