Skip to main content

Module static_content

Module static_content 

Source
Expand description

Static and prerendered content serving.

Serves prerendered HTML, static assets, homepage, and metadata files from the web dist directory, falling back to the content repository when a page is known but not prerendered. Re-exports the matcher (StaticContentMatcher), the serving state (StaticContentState), and the session helpers (SessionInfo, ensure_session).

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

Re-exports§

pub use config::StaticContentMatcher;
pub use homepage::serve_homepage;
pub use session::SessionInfo;
pub use session::ensure_session;
pub use static_files::StaticContentState;
pub use static_files::serve_static_content;
pub use fallback::*;

Modules§

config
StaticContentMatcher that maps request paths to content-source slugs via sitemap URL patterns.
fallback
Fallback handler returning JSON 404s for unmatched API paths and static content otherwise.
homepage
Serves the prebuilt index.html homepage with ETag-based conditional-request handling.
session
Resolves or provisions a browser SessionInfo from JWT cookies for static-content requests.
static_files
Static-file request handling with caching and content fallback.