Navigated to /docs/core/runtime-configuration

Runtime configuration reference

Review page runtime, document, SSR handler, cache, and image options with their production defaults.

Configure shared route behavior through defineConfig

API / optionTypeDefaultBehavior
ssr.getPageProps() => recordunsetAdds application props to every page component.
ssr.notFoundComponentsrc/pages/404Overrides the discovered not-found component.
ssr.csrFallbackChild | functionempty route nodeServer shell for CSR routes.
ssr.csrActionsCsrActionsOptionsdisabledRoutes browser form submissions to a configured action endpoint.
ssr.middlewarePageMiddleware[][]Runs before route and layout middleware.
ssr.allowExternalRedirectsbooleanfalsePermits normalized redirects to another origin.
ssr.trustedHostsstring[]local host policyAllows inbound hosts for action-origin validation.
ssr.i18nI18nServiceregistered defaultResolves locale-aware paths, messages, and document direction.
pluginsTavoPluginInput[]Accepts the public plugin array or { use, overrides } form and adds manifest-declared pages, middleware, capabilities, stores, head entries, endpoints, and build contributions.
ssr.maxResolvedCacheEntriesnumber1024Bounds process-local resolved static route data. Zero disables reuse; invalid values throw TAVO_PAGES_001.
ssr.instrumentationTavoInstrumentationunsetReceives isolated route lifecycle events.

Document rendering options

API / optionTypeDefaultBehavior
langstring"en"HTML language unless the resolved i18n locale overrides it.
titlestring""Escaped base document title; resolved route and component metadata can replace it.
unsafeHeadHtmlstring""Trusted raw HTML inserted into the document head. Prefer escaped TSX metadata and use this explicit unsafe boundary only for reviewed markup.
htmlAttributes / bodyAttributes / appAttributesrecord{}Safe string, number, or boolean attributes.
doctypestring"<!doctype html>"Document prefix.
appContainerIdstring"app"ID of the rendered application container.
initialStateunknownomittedSerialized as escaped JSON when defined.
stateScriptIdstring"__TAVO_STATE__"ID of the JSON hydration script.
noncestringunsetApplied to state, style, and deferred patch scripts where supported.
beforeRender() => voidunsetRe-establishes request context before render passes and stream chunks.
styleRegistryStyleRegistrynew registryCollects SSR component styles with deduplication.

SSR handler options

API / optionTypeDefaultBehavior
modulesPageModulesrequiredRoute module map used to create the pages runtime.
canonicalOriginstringrequest hostNode-only public HTTP(S) origin behind TLS termination. Invalid origins throw TAVO_SSR_001.
documentRenderDocumentOptions{}Base HTML shell and CSP settings.
streambooleanfalseReturns streamed HTML and enables progressive Deferred patches.
imagesImageOptimizerOptionsoptimizer defaultsConfigures /_tavo/image processing.
staticCacheSsrStaticCachememory, 1024 entriesRendered-response cache adapter.
maxRequestBodyBytesnumber10485760Node-only action body limit; excess input receives 413.

Image optimizer defaults

API / optionTypeDefaultBehavior
enabledbooleantrueEnables the optimizer endpoint when image options are used.
allowRemotebooleanfalseRemote sources remain blocked until explicitly enabled and allowlisted.
publicDirstring"public"Root for absolute local image paths.
qualitynumber75Default output quality.
cacheMaxAgeseconds31536000Successful response cache lifetime.
defaultFormatImageFormat"webp"Output format when negotiation does not select another configured format.
sizesnumber[]320, 640, 960, 1280, 1600Allowed responsive widths.
timeoutMsnumber5000Remote fetch timeout.
maxBytesnumber10485760Maximum source image size.
memoryCacheMaxEntriesnumber128Process-local optimized image entries.
maxConcurrentTransformsnumber4Active transformations, clamped to at least one.
maxPendingTransformsnumber64Queued transformations before the endpoint returns 503.
allowInsecureRemotebooleanfalseHTTP and private-network protections remain enabled by default.

Look up exact public types

Follow linked API names to their canonical TypeScript declarations and package boundaries.