Merge branch 'master' of github.com:beyondcode/laravel-websockets
This commit is contained in:
commit
687d584e56
|
|
@ -50,7 +50,7 @@ return [
|
||||||
* Leave this empty if you want to accepts requests from all hosts.
|
* Leave this empty if you want to accepts requests from all hosts.
|
||||||
*/
|
*/
|
||||||
'allowedOrigins' => [
|
'allowedOrigins' => [
|
||||||
|
//
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,5 @@ use BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers\SendMessage;
|
||||||
use BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers\ShowDashboard;
|
use BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers\ShowDashboard;
|
||||||
|
|
||||||
Route::get('/', ShowDashboard::class);
|
Route::get('/', ShowDashboard::class);
|
||||||
Route::post('/auth', AuthenticateDashboard::class);
|
Route::post('auth', AuthenticateDashboard::class);
|
||||||
Route::post('/event', SendMessage::class);
|
Route::post('event', SendMessage::class);
|
||||||
|
|
@ -60,7 +60,10 @@ abstract class EchoController implements HttpServerInterface
|
||||||
|
|
||||||
function onError(ConnectionInterface $connection, Exception $exception)
|
function onError(ConnectionInterface $connection, Exception $exception)
|
||||||
{
|
{
|
||||||
if ($exception instanceof HttpException) {
|
if (! $exception instanceof HttpException) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$response = new Response($exception->getStatusCode(), [
|
$response = new Response($exception->getStatusCode(), [
|
||||||
'Content-Type' => 'application/json'
|
'Content-Type' => 'application/json'
|
||||||
], json_encode([
|
], json_encode([
|
||||||
|
|
@ -70,7 +73,6 @@ abstract class EchoController implements HttpServerInterface
|
||||||
$connection->send(Psr\str($response));
|
$connection->send(Psr\str($response));
|
||||||
$connection->close();
|
$connection->close();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function ensureValidAppId(string $appId)
|
public function ensureValidAppId(string $appId)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue