Cap websocket client payload size in runtime
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
62bdc914e8
commit
9a5a8c7e5d
1 file changed
+3
@@ -94,6 +94,7 @@ interface JsonRpcErrorResult {
|
||||
}
|
||||
|
||||
const BOOTSTRAP_SESSION_TIMEOUT_MS = 3_000;
|
||||
const MAX_WS_CLIENT_PAYLOAD_BYTES = 5 * 1024 * 1024;
|
||||
|
||||
interface BootstrapSessionResult {
|
||||
session: ProviderSession;
|
||||
@@ -467,6 +468,8 @@ export async function startRuntimeApiServer(
|
||||
const wss = new WebSocketServer({
|
||||
host: "127.0.0.1",
|
||||
port: options.port,
|
||||
maxPayload: MAX_WS_CLIENT_PAYLOAD_BYTES,
|
||||
perMessageDeflate: false,
|
||||
});
|
||||
|
||||
const isAuthorizedConnection = (requestUrl: string | undefined) => {
|
||||
|
||||
Reference in new issue
Block a user