mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix(api): don't ignore private routes
This commit is contained in:
parent
b2f47f8e53
commit
a8e3624594
1 changed files with 3 additions and 1 deletions
|
|
@ -39,7 +39,9 @@ pub async fn ignore_invalid_routes<B>(request: Request<B>, next: Next<B>) -> Res
|
||||||
.into_response()
|
.into_response()
|
||||||
}
|
}
|
||||||
// we ignored v1 routes earlier, now let's ignore all non-v2 routes
|
// 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 (
|
return (
|
||||||
StatusCode::BAD_REQUEST,
|
StatusCode::BAD_REQUEST,
|
||||||
r#"{"message":"Unsupported API version","code":0}"#,
|
r#"{"message":"Unsupported API version","code":0}"#,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue