diff --git a/src/subcommand/server.rs b/src/subcommand/server.rs index 438acb5fa0..9c4f99351b 100644 --- a/src/subcommand/server.rs +++ b/src/subcommand/server.rs @@ -260,12 +260,6 @@ impl Server { "/r/children/{inscription_id}/inscriptions/{page}", get(r::children_inscriptions_paginated), ) - .route( - "/r/children/{inscription_id}/{page}", - get(r::children_paginated), - ) - .route("/r/inscription/{inscription_id}", get(r::inscription)) - .route("/r/metadata/{inscription_id}", get(r::metadata)) .route("/r/parents/{inscription_id}", get(r::parents)) .route( "/r/parents/{inscription_id}/{page}", @@ -286,6 +280,12 @@ impl Server { let proxy_routes = Router::new() .route("/content/{inscription_id}", get(r::content)) + .route( + "/r/children/{inscription_id}/{page}", + get(r::children_paginated), + ) + .route("/r/inscription/{inscription_id}", get(r::inscription)) + .route("/r/metadata/{inscription_id}", get(r::metadata)) .route("/r/sat/{sat_number}/at/{index}", get(r::sat_at_index)); async fn proxy_fallback( diff --git a/src/subcommand/server/r.rs b/src/subcommand/server/r.rs index 430239d519..23b28774f3 100644 --- a/src/subcommand/server/r.rs +++ b/src/subcommand/server/r.rs @@ -225,14 +225,10 @@ pub(super) async fn children_paginated( ) -> ServerResult { task::block_in_place(|| { let Some(parent) = index.get_inscription_entry(parent)? else { - return if let Some(proxy) = server_config.proxy.as_ref() { - Server::proxy(proxy, &format!("r/children/{}/{}", parent, page)) - } else { - Err(ServerError::NotFound(format!( - "inscription {} not found", - parent - ))) - }; + return Err(ServerError::NotFound(format!( + "inscription {} not found", + parent + ))); }; let parent_sequence_number = parent.sequence_number; @@ -353,14 +349,10 @@ pub(super) async fn inscription( ) -> ServerResult { task::block_in_place(|| { let Some(inscription) = index.get_inscription_by_id(inscription_id)? else { - return if let Some(proxy) = server_config.proxy.as_ref() { - Server::proxy(proxy, &format!("r/inscription/{}", inscription_id)) - } else { - Err(ServerError::NotFound(format!( - "inscription {} not found", - inscription_id - ))) - }; + return Err(ServerError::NotFound(format!( + "inscription {} not found", + inscription_id + ))); }; let entry = index @@ -425,14 +417,10 @@ pub(super) async fn metadata( ) -> ServerResult { task::block_in_place(|| { let Some(inscription) = index.get_inscription_by_id(inscription_id)? else { - return if let Some(proxy) = server_config.proxy.as_ref() { - Server::proxy(proxy, &format!("r/metadata/{}", inscription_id)) - } else { - Err(ServerError::NotFound(format!( - "inscription {} not found", - inscription_id - ))) - }; + return Err(ServerError::NotFound(format!( + "inscription {} not found", + inscription_id + ))); }; let metadata = inscription