Enables or disables request logging.
Environment variable: SERVER_ACCESS_LOGGING
Environment value: "1" (true), "0" (false)
true
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:
0
The time in milliseconds to wait for the server to gracefully close before forcefully shutting down.
Environment variable: SERVER_GRACEFUL_TIMEOUT
Environment value:
5000
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)
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:
72000
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
info
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:
"request-id"
Lets the server know that it's 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 are only read at runtime via environment variables. The HTTPS key can be set via the
SERVER_KEY_PATHvariable, and the certificate can be set via theSERVER_CERT_PATHvariable.The server tries to read the
HOSTandPORTenvironment variables to configure the listen target. If the environment variableSERVER_SOCKETis set, it will take precedence overHOSTandPORT. In the case, none of the above (HOST,PORT,SERVER_SOCKET) variables are present it will use the Astro server options.