From 0ffa129937373e2240a470d5fad405cc42c0da0e Mon Sep 17 00:00:00 2001 From: _ <> Date: Sat, 20 Feb 2021 16:23:12 +0000 Subject: [PATCH] :construction: wip: add prefix for relay debugging tools --- crates/ptth_relay/src/lib.rs | 3 +++ handlebars/relay/debug.hbs | 44 ++++++++++++++++++++++++++++++++ handlebars/relay/relay_root.html | 4 +++ todo.md | 1 + 4 files changed, 52 insertions(+) create mode 100644 handlebars/relay/debug.hbs diff --git a/crates/ptth_relay/src/lib.rs b/crates/ptth_relay/src/lib.rs index d3fcaf9..a6da42e 100644 --- a/crates/ptth_relay/src/lib.rs +++ b/crates/ptth_relay/src/lib.rs @@ -354,6 +354,9 @@ async fn handle_all ( Ok (error_reply (StatusCode::BAD_REQUEST, "Bad URI format")?) } } + else if let Some (rest) = prefix_match ("/frontend/debug/", &path) { + Ok (error_reply (StatusCode::NOT_IMPLEMENTED, "Not implemented (yet)")?) + } else if path == "/" { let s = handlebars.render ("relay_root", &())?; Ok (ok_reply (s)?) diff --git a/handlebars/relay/debug.hbs b/handlebars/relay/debug.hbs new file mode 100644 index 0000000..c8c7080 --- /dev/null +++ b/handlebars/relay/debug.hbs @@ -0,0 +1,44 @@ + +
+ + + + +