Skip to main content
Server.prototype.headersTimeout - http - Node documentation
property Server.prototype.headersTimeout

Usage in Deno

import { Server } from "node:http";

Limit the amount of time the parser will wait to receive the complete HTTP headers.

If the timeout expires, the server responds with status 408 without forwarding the request to the request listener and then closes the connection.

It must be set to a non-zero value (e.g. 120 seconds) to protect against potential Denial-of-Service attacks in case the server is deployed without a reverse proxy in front.

Type

number