Merge branch 'master' into 2.x

This commit is contained in:
rennokki 2020-08-13 15:25:03 +03:00 committed by GitHub
commit edcecff9af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -195,7 +195,7 @@ return [
|
*/
'logger' => \BeyondCode\LaravelWebSockets\Statistics\Logger::class,
'logger' => BeyondCode\LaravelWebSockets\Statistics\Logger\HttpStatisticsLogger::class,
/*
|--------------------------------------------------------------------------

View File

@ -118,7 +118,7 @@
wssPort: this.port === null ? 6001 : this.port,
wsPath: this.app.path === null ? '' : this.app.path,
disableStats: true,
authEndpoint: '{{ url('/auth') }}',
authEndpoint: '{{ url(request()->path().'/auth') }}',
auth: {
headers: {
'X-CSRF-Token': "{{ csrf_token() }}",
@ -162,7 +162,7 @@
},
loadChart() {
$.getJSON('{{ url('/api') }}/' + this.app.id + '/statistics', (data) => {
$.getJSON('{{ url(request()->path().'/api') }}/' + this.app.id + '/statistics', (data) => {
let chartData = [
{
@ -246,7 +246,7 @@
},
sendEvent() {
$.post('{{ url('/event') }}', {
$.post('{{ url(request()->path().'/event') }}', {
_token: '{{ csrf_token() }}',
key: this.app.key,
secret: this.app.secret,

View File

@ -64,7 +64,7 @@ class StartWebSocketServer extends Command
$browser = new Browser($this->loop, $connector);
$this->laravel->singleton(StatisticsLoggerInterface::class, function () use ($browser) {
$class = config('websockets.statistics.logger', \BeyondCode\LaravelWebSockets\Statistics\Logger::class);
$class = config('websockets.statistics.logger', \BeyondCode\LaravelWebSockets\Statistics\Logger\HttpStatisticsLogger::class);
return new $class(app(ChannelManager::class), $browser);
});