From a8e3624594bb8282fb0b17484bcc06a38e28100e Mon Sep 17 00:00:00 2001 From: spiral Date: Sun, 19 Mar 2023 15:19:52 -0400 Subject: [PATCH] fix(api): don't ignore private routes --- services/api/src/middleware/ignore_invalid_routes.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/api/src/middleware/ignore_invalid_routes.rs b/services/api/src/middleware/ignore_invalid_routes.rs index 2b6699e2..e46c620a 100644 --- a/services/api/src/middleware/ignore_invalid_routes.rs +++ b/services/api/src/middleware/ignore_invalid_routes.rs @@ -39,7 +39,9 @@ pub async fn ignore_invalid_routes(request: Request, next: Next) -> Res .into_response() } // we ignored v1 routes earlier, now let's ignore all non-v2 routes - else if !request.uri().clone().path().starts_with("/v2") { + else if !request.uri().clone().path().starts_with("/v2") + && !request.uri().clone().path().starts_with("/private") + { return ( StatusCode::BAD_REQUEST, r#"{"message":"Unsupported API version","code":0}"#,