Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Drone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
Drone
Commits
ccb3fefb
Commit
ccb3fefb
authored
1 year ago
by
DeathwingTheBoss
Browse files
Options
Downloads
Patches
Plain Diff
- 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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Cargo.lock
+1
-1
1 addition, 1 deletion
Cargo.lock
Cargo.toml
+1
-1
1 addition, 1 deletion
Cargo.toml
src/main.rs
+0
-4
0 additions, 4 deletions
src/main.rs
with
2 additions
and
6 deletions
Cargo.lock
+
1
−
1
View file @
ccb3fefb
...
@@ -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",
...
...
This diff is collapsed.
Click to expand it.
Cargo.toml
+
1
−
1
View file @
ccb3fefb
[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."
...
...
This diff is collapsed.
Click to expand it.
src/main.rs
+
0
−
4
View file @
ccb3fefb
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment