Enables or disables request logging.
Environment variable: SERVER_ACCESS_LOGGING
Environment value: "1" (true), "0" (false)
Defines the compression threshold in bytes. If the response size is smaller than this threshold, it will not be compressed. (As long as the response isn't a streaming response.)
Environment variable: SERVER_COMPRESSION_THRESHOLD
Environment value:
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:
Disables Astro's experimental HTML streaming feature.
Environment variable: SERVER_DISABLE_ASTRO_HTML_STREAMING
Environment value: "1" (true), "0" (false)
Disables on-demand compression for all responses handled by Fastify.
Using this option will not globally disable compression, since your implementation can still reply with compressed responses.
This can be useful if the service is deployed behind a reverse proxy which handles compression but requires the Content-Length header.
Environment variable: SERVER_DISABLE_ON_DEMAND_COMPRESSION
Environment value: "1" (true), "0" (false)
Buffers all responses returned by Astro. But since they're passed to Fastify, they can still be compressed and therefore converted to streaming responses.
This can be useful if the service is deployed behind a reverse proxy which handles compression but requires the Content-Length header.
Environment variable: SERVER_ENABLE_ASTRO_RESPONSE_BUFFERING
Environment value: "1" (true), "0" (false)
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: LogLevel
The header name that should be used to set the request ID. For 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_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.