GitHub

API reference for Options.

Attributes

AttributeTypeDescription
portNotRequired[int]

0 (the default): any free port.

hostNotRequired[str]

Every interface by default.

graceful_shutdown_timeoutNotRequired[DurationInput]

How long requests in flight may run once the server closes (20s).

keep_alive_timeoutNotRequired[DurationInput]

How long a connection may be idle between requests (Node's keepAliveTimeout, 5s).

headers_timeoutNotRequired[DurationInput]

How long a request head may take to arrive (Node's headersTimeout, 60s); a started one is answered with 408.

request_timeoutNotRequired[DurationInput]

How long a whole request (head and body) may take to arrive (Node's requestTimeout, 300s); a body that does not fails its read and the connection is closed.

websocket_max_message_sizeNotRequired[int]

The longest WebSocket message a client may send (100 MiB, as ws's maxPayload); a longer one, sent or inflated, closes the connection with 1009.

websocket_per_message_deflateNotRequired[bool | PerMessageDeflate]

Accept WebSocket clients' permessage-deflate offers (off by default, as ws's perMessageDeflate); True takes ws's defaults.