Enables or disables request logging.
Environment variable: SERVER_ACCESS_LOGGING
Environment value: "1" (true
), "0" (false
)
Defines the server timeout in milliseconds. See the Node.js documentation for more details: https://nodejs.org/api/http.html#http_server_timeout
Environment variable: SERVER_CONNECTION_TIMEOUT
Environment value:
The time in milliseconds to wait for the server to gracefully close before forcefully shutting down.
Environment variable: SERVER_GRACEFUL_TIMEOUT
Environment value:
If true
an HTTP/2 server will be created instead of the HTTP/1.1 one.
Environment variable: SERVER_HTTP2
Environment value: "1" (true
), "0" (false
)
Defines the server keep-alive timeout in milliseconds. See the Node.js documentation for more details: https://nodejs.org/api/http.html#http_server_keepalivetimeout
Environment variable: SERVER_KEEP_ALIVE_TIMEOUT
Environment value:
Defines the log level the server should use. Note that this only affects the server, not Astro itself.
Environment variable: SERVER_LOG_LEVEL
Environment value: Level
The header name that should be used to set the request ID. Fore more details see Fastify's documentation: https://fastify.dev/docs/latest/Reference/Logging/#logging-request-id
Environment variable: SERVER_REQUEST_ID_HEADER
Environment value:
Lets the server know that it is behind a proxy and should trust the "X-Forwarded-*" headers. For more details see Fastify's documentation: https://fastify.dev/docs/latest/Reference/Server/#trustproxy
Environment variable: SERVER_TRUST_PROXY
Environment value: "1" (true
), "0" (false
),
Can be used to configure the server (Fastify).
Note that the HTTPS environment variables are only read at runtime via environment variables. The HTTPS key can be set via the
SERVER_KEY_PATH
variable, and the certificate can be set via theSERVER_CERT_PATH
variable.The server tries to read the
HOST
andPORT
environment variables to configure the listen target. If the environment variableSERVER_SOCKET
is set, it will take precedence overHOST
andPORT
. In the case, none of the above (HOST
,PORT
,SERVER_SOCKET
) variables are present it will use the Astro server options.