static_handler

Function static_handler 

Source
async fn static_handler(uri: Uri) -> Response
Expand description

Handles requests for static web UI assets.

This function attempts to serve the requested file from the embedded assets. If the path is empty or “index.html”, it serves “index.html”. If a file is not found, it falls back to serving “index.html” for client-side routing.

§Arguments

  • uri - The Uri of the incoming request.

§Returns

An Axum Response containing the static file or a 404 error.