Update modules
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user