Skip to content
Snippets Groups Projects
Commit ccb3fefb authored by DeathwingTheBoss's avatar DeathwingTheBoss
Browse files

- Version bump

- Remove follow_api and tags_api (wrong implementation, unnecessary)
parent 233ce5c1
No related branches found
No related tags found
No related merge requests found
...@@ -574,7 +574,7 @@ checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" ...@@ -574,7 +574,7 @@ checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257"
[[package]] [[package]]
name = "drone" name = "drone"
version = "0.2.1" version = "0.2.2"
dependencies = [ dependencies = [
"actix-cors", "actix-cors",
"actix-web", "actix-web",
......
[package] [package]
name = "drone" name = "drone"
version = "0.2.1" version = "0.2.2"
edition = "2021" edition = "2021"
authors = ["Deathwing <hi@deathwing.me>"] authors = ["Deathwing <hi@deathwing.me>"]
description = "A caching reverse-proxy application for the Hive blockchain." description = "A caching reverse-proxy application for the Hive blockchain."
......
...@@ -161,8 +161,6 @@ async fn handle_request( ...@@ -161,8 +161,6 @@ async fn handle_request(
"condenser_api.get_replies_by_last_update" => Endpoints::HIVEMIND, "condenser_api.get_replies_by_last_update" => Endpoints::HIVEMIND,
"condenser_api.get_reblogged_by" => Endpoints::HIVEMIND, "condenser_api.get_reblogged_by" => Endpoints::HIVEMIND,
_bridge_endpoint if method.starts_with("bridge.") => Endpoints::HIVEMIND, _bridge_endpoint if method.starts_with("bridge.") => Endpoints::HIVEMIND,
"follow_api" => Endpoints::HIVEMIND,
"tags_api" => Endpoints::HIVEMIND,
_anything_else => Endpoints::HAF, _anything_else => Endpoints::HAF,
}; };
...@@ -249,7 +247,6 @@ async fn api_call( ...@@ -249,7 +247,6 @@ async fn api_call(
call: web::Json<APICall>, call: web::Json<APICall>,
data: web::Data<AppData>, data: web::Data<AppData>,
) -> impl Responder { ) -> impl Responder {
// Log the request, if there's Cloudflare header (CF-Connecting-IP) use that instead of peer_addr.
let get_cloudflare_ip = req.headers().get("CF-Connecting-IP"); let get_cloudflare_ip = req.headers().get("CF-Connecting-IP");
let client_ip = match get_cloudflare_ip { let client_ip = match get_cloudflare_ip {
...@@ -284,7 +281,6 @@ async fn api_call( ...@@ -284,7 +281,6 @@ async fn api_call(
} }
APICall::Batch(requests) => { APICall::Batch(requests) => {
let mut responses = Vec::new(); let mut responses = Vec::new();
// If there's over 100 in the batch, return an error.
if requests.len() > 100 { if requests.len() > 100 {
return HttpResponse::InternalServerError().json(ErrorStructure { return HttpResponse::InternalServerError().json(ErrorStructure {
code: -32600, code: -32600,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment