From e171be5cf7f5f32b7a8c281d417208b908da38ec Mon Sep 17 00:00:00 2001 From: Rob Wagner Date: Sat, 29 Jul 2023 17:06:49 -0400 Subject: [PATCH] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) 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