Skip to main content

spa_fallback

Function spa_fallback 

Source
pub async fn spa_fallback(method: Method, headers: HeaderMap) -> Response
Available on crate features serve-ui and serve only.
Expand description

Router fallback: an HTML-accepting GET to an unmatched path returns the SPA shell (enables hash-route deep links); everything else gets the standard JSON 404 so the API’s 404 shape is preserved.