diff --git a/README.md b/README.md index 681f624..ca3de95 100644 --- a/README.md +++ b/README.md @@ -100,8 +100,14 @@ use axum_htmx::HxRequestGuardLayer; fn protected_router() -> Router { Router::new() + // Redirects to "/" if the HX-Request header is not present .layer(HxRequestGuardLayer::default()) } + +fn other_route() -> Router { + Router::new() + .layer(HxRequestGuardLayer::new("/redirect-to-this-route")) +} ``` ### Feature Flags