MCPcopy Create free account
hub / github.com/bahdotsh/mdlib / static_handler

Function static_handler

src/embedded.rs:86–89  ·  view source on GitHub ↗

Handler for all embedded static assets

(uri: axum::http::Uri)

Source from the content-addressed store, hash-verified

84
85// Handler for all embedded static assets
86pub async fn static_handler(uri: axum::http::Uri) -> impl IntoResponse {
87 let path = uri.path().trim_start_matches('/');
88 serve_embedded_file(path).await
89}
90
91// Function to verify that essential files are embedded
92pub fn verify_essential_files() -> Result<(), Vec<&'static str>> {

Callers

nothing calls this directly

Calls 1

serve_embedded_fileFunction · 0.85

Tested by

no test coverage detected