This commit is contained in:
Girish Ramakrishnan
2023-04-10 10:35:25 +02:00
parent d26c86f60f
commit 354eff93b7
3 changed files with 9 additions and 8 deletions
+2 -2
View File
@@ -25,8 +25,8 @@ let gHttpServer = null;
async function initializeExpressSync() {
const app = express();
// server socket "idle" timeout is 0 by default. we use the timeout middleware to handle timeouts on a route level
const httpServer = http.createServer({ headersTimeout: 60000, requestTimeout: 1000 * 60 * 60 }, app); // see also nginx client_header_timeout (30s)
// disable slowloris prevention: https://github.com/nodejs/node/issues/47421
const httpServer = http.createServer({ headersTimeout: 0, requestTimeout: 0 }, 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