Skip to content

Commit cbc52ba

Browse files
committed
Mitigate against the ws DoS vuln
1 parent 7c02423 commit cbc52ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/webapp/server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ if (process.env.HTTP_SERVER_DISABLED !== "true") {
129129
});
130130

131131
server.keepAliveTimeout = 65 * 1000;
132+
// Mitigate against https://github.com/triggerdotdev/trigger.dev/security/dependabot/128
133+
// by not allowing 2000+ headers to be sent and causing a DoS
134+
// headers will instead be limited by the maxHeaderSize
135+
server.maxHeadersCount = 0;
132136

133137
process.on("SIGTERM", () => {
134138
server.close((err) => {

0 commit comments

Comments
 (0)