diff --git a/config/websockets.php b/config/websockets.php index ce79f2c..5e639d3 100644 --- a/config/websockets.php +++ b/config/websockets.php @@ -37,9 +37,9 @@ return [ ], /* - * The maximum request size in bytes that is allowed for an incoming websocket request. + * The maximum request size in kilobytes that is allowed for an incoming websocket request. */ - 'maxRequestSize' => 1024 * 250, + 'maxRequestSizeInKb' => 250, /* * Define the optional SSL context for your websocket connections. diff --git a/src/Server/WebSocketServer.php b/src/Server/WebSocketServer.php index b392112..d65285a 100644 --- a/src/Server/WebSocketServer.php +++ b/src/Server/WebSocketServer.php @@ -87,7 +87,7 @@ class WebSocketServer $app = new OriginCheck($router, config('websockets.allowedOrigins', [])); - $httpServer = new HttpServer($app, config('websockets.maxRequestSize')); + $httpServer = new HttpServer($app, config('websockets.maxRequestSizeInKb') * 1024); if (HttpLogger::isEnabled()) { $httpServer = HttpLogger::decorate($httpServer);