diff options
Diffstat (limited to 'test_util/src')
-rw-r--r-- | test_util/src/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs index 73a1df043..10e803f5f 100644 --- a/test_util/src/lib.rs +++ b/test_util/src/lib.rs @@ -147,6 +147,14 @@ pub async fn run_all_servers() { warp::redirect(u) }) .or( + warp::path!("a" / "b" / "c") + .and(warp::header::<String>("x-location")) + .map(|token: String| { + let uri: Uri = token.parse().unwrap(); + warp::redirect(uri) + }), + ) + .or( warp::any() .and(warp::path::peek()) .and(warp::fs::dir(root_path())) |