Update modules

This commit is contained in:
Girish Ramakrishnan
2026-02-14 19:45:15 +01:00
parent 361d80da17
commit eae86d15ef
3 changed files with 589 additions and 576 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ import routes from './routes/index.js';
import safe from 'safetydance';
import users from './users.js';
import util from 'node:util';
import ws from 'ws';
import { WebSocketServer } from 'ws';
const debug = debugModule('box:server');
@@ -30,7 +30,7 @@ async function initializeExpressSync() {
// disable slowloris prevention: https://github.com/nodejs/node/issues/47421 . duplicate headers are discarded for the standard headers (https://nodejs.org/api/http.html#messageheaders)
const httpServer = http.createServer({ headersTimeout: 0, requestTimeout: 0, joinDuplicateHeaders: false }, app); // see also nginx client_header_timeout (30s)
const wsServer = new ws.Server({ noServer: true }); // in noServer mode, we have to handle 'upgrade' and call handleUpgrade
const wsServer = new WebSocketServer({ noServer: true }); // in noServer mode, we have to handle 'upgrade' and call handleUpgrade
const REQUEST_TIMEOUT = 60000; // timeout for all requests (see also setTimeout on the httpServer)