hardenServer
hardenServer<
S>(server,o?):S
Tighter HTTP timeouts than Node’s defaults (headers 60 s, whole request 300 s, 2000 headers) for a server that only serves small pages and
socket upgrades: a client that sends its request headers slowly (slowloris) is cut after headersMs, an idle keep-alive after 5 s.
Type Parameters
Section titled “Type Parameters”S extends Server<typeof IncomingMessage, typeof ServerResponse>
Parameters
Section titled “Parameters”server
Section titled “server”S
headersMs?
Section titled “headersMs?”number
keepAliveMs?
Section titled “keepAliveMs?”number
maxHeaders?
Section titled “maxHeaders?”number
requestMs?
Section titled “requestMs?”number
Returns
Section titled “Returns”S