Skip to main content

Module static_files

Module static_files 

Source
Expand description

Static-file request handling with caching and content fallback.

serve_static_content routes an incoming URI to a static asset, prerendered HTML page, metadata file, or the content-repository fallback, applying the appropriate cache policy and ETag for each. StaticContentState carries the app context, matcher, and route classifier into the handler.

Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.

Structs§

StaticContentState

Constants§

CACHE_HTML
CACHE_METADATA
CACHE_STATIC_ASSET
CACHE_STATIC_ASSET_REVALIDATE

Functions§

asset_cache_policy
compute_etag
serve_static_content