aboutsummaryrefslogtreecommitdiff
path: root/examples/windmark.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-03-27 04:20:30 +0000
committerFuwn <[email protected]>2022-03-27 04:20:30 +0000
commit299f53da9ee08c8b326bd913c5911a234e50726d (patch)
tree62f3a8f3b5975a88c1306a041796da12cf324458 /examples/windmark.rs
parentfeat(response): implement many more responses (diff)
downloadwindmark-299f53da9ee08c8b326bd913c5911a234e50726d.tar.xz
windmark-299f53da9ee08c8b326bd913c5911a234e50726d.zip
feat(response): add remaining responses (redirect)
Diffstat (limited to 'examples/windmark.rs')
-rw-r--r--examples/windmark.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/windmark.rs b/examples/windmark.rs
index 1cccd70..e1e576e 100644
--- a/examples/windmark.rs
+++ b/examples/windmark.rs
@@ -108,6 +108,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
})
.mount("/error", |_| Response::CertificateNotValid("no".into()))
+ .mount("/redirect", |_| {
+ Response::PermanentRedirect("gemini://localhost/test".into())
+ })
.run()
.await
}