Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.
interface
http.ServerOptions
interface ServerOptions<Request extends typeof IncomingMessage = typeof IncomingMessage, Response extends typeof ServerResponse = typeof ServerResponse>
- headersTimeout?: number
Sets the timeout value in milliseconds for receiving the complete HTTP headers from the client. See Server.headersTimeout for more information.
- highWaterMark?: number
Optionally overrides all
sockets'readableHighWaterMarkandwritableHighWaterMark. This affectshighWaterMarkproperty of bothIncomingMessageandServerResponse. Default: - IncomingMessage?: Request
Specifies the
IncomingMessageclass to be used. Useful for extending the originalIncomingMessage. - insecureHTTPParser?: boolean
Use an insecure HTTP parser that accepts invalid HTTP headers when
true. Using the insecure parser should be avoided. See --insecure-http-parser for more information. - joinDuplicateHeaders?: boolean
It joins the field line values of multiple headers in a request with
,instead of discarding the duplicates. - keepAlive?: boolean
If set to
true, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, similarly on what is done insocket.setKeepAlive([enable][, initialDelay]). - keepAliveInitialDelay?: number
If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
- keepAliveTimeout?: number
The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response, before a socket will be destroyed.
- keepAliveTimeoutBuffer?: number
An additional buffer time added to the
server.keepAliveTimeoutto extend the internal socket timeout. - maxHeaderSize?: number
Optionally overrides the value of
--max-http-header-sizefor requests received by this server, i.e. the maximum length of request headers in bytes. - noDelay?: boolean
If set to
true, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. - rejectNonStandardBodyWrites?: boolean
If set to
true, an error is thrown when writing to an HTTP response which does not have a body. - requestTimeout?: number
Sets the timeout value in milliseconds for receiving the entire request from the client.
- requireHostHeader?: boolean
If set to
true, it forces the server to respond with a 400 (Bad Request) status code to any HTTP/1.1 request message that lacks a Host header (as mandated by the specification). - ServerResponse?: Response
Specifies the
ServerResponseclass to be used. Useful for extending the originalServerResponse. - shouldUpgradeCallback?: (request: InstanceType<Request>) => boolean
A callback which receives an incoming request and returns a boolean, to control which upgrade attempts should be accepted. Accepted upgrades will fire an
'upgrade'event (or their sockets will be destroyed, if no listener is registered) while rejected upgrades will fire a'request'event like any non-upgrade request. - uniqueHeaders?: string | string[][]
A list of response headers that should be sent only once. If the header's value is an array, the items will be joined using
;.