aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYigit Sever2021-04-16 01:48:04 +0300
committerYigit Sever2021-04-16 01:48:04 +0300
commited77ad769becf1db1407eeca710ac393abc07ffa (patch)
tree9a86cbd21cdfef526d02fd4be34c9450d3269308 /src
parenteab91040254b1b3e7556c29a1ab6a57f139308ee (diff)
downloadgradecoin-ed77ad769becf1db1407eeca710ac393abc07ffa.tar.gz
gradecoin-ed77ad769becf1db1407eeca710ac393abc07ffa.tar.bz2
gradecoin-ed77ad769becf1db1407eeca710ac393abc07ffa.zip
Give up on content length
Diffstat (limited to 'src')
-rw-r--r--src/custom_filters.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/custom_filters.rs b/src/custom_filters.rs
index 299cd8d..7e0cae5 100644
--- a/src/custom_filters.rs
+++ b/src/custom_filters.rs
@@ -11,7 +11,6 @@ pub fn with_db(db: Db) -> impl Filter<Extract = (Db,), Error = Infallible> + Clo
11/// Extracts an `InitialAuthRequest` JSON body from the request 11/// Extracts an `InitialAuthRequest` JSON body from the request
12/// Accepts only JSON encoded `AuthRequest` body and rejects big payloads 12/// Accepts only JSON encoded `AuthRequest` body and rejects big payloads
13/// 13///
14// TODO: find a good limit for this, (=e2482057; 8 char String + rsa pem) <11-04-21, yigit> //
15pub fn auth_request_json_body( 14pub fn auth_request_json_body(
16) -> impl Filter<Extract = (InitialAuthRequest,), Error = Rejection> + Clone { 15) -> impl Filter<Extract = (InitialAuthRequest,), Error = Rejection> + Clone {
17 warp::body::content_length_limit(1024 * 32).and(warp::body::json()) 16 warp::body::content_length_limit(1024 * 32).and(warp::body::json())
@@ -19,7 +18,6 @@ pub fn auth_request_json_body(
19 18
20/// Extracts an `Transaction` JSON body from the request 19/// Extracts an `Transaction` JSON body from the request
21/// Accepts only JSON encoded `Transaction` body and rejects big payloads 20/// Accepts only JSON encoded `Transaction` body and rejects big payloads
22// TODO: find a good limit for this <11-04-21, yigit> //
23pub fn transaction_json_body() -> impl Filter<Extract = (Transaction,), Error = Rejection> + Clone { 21pub fn transaction_json_body() -> impl Filter<Extract = (Transaction,), Error = Rejection> + Clone {
24 warp::body::content_length_limit(1024 * 32).and(warp::body::json()) 22 warp::body::content_length_limit(1024 * 32).and(warp::body::json())
25} 23}
@@ -33,7 +31,6 @@ pub fn auth_header() -> impl Filter<Extract = (String,), Error = Rejection> + Cl
33 31
34/// Extracts an `Block` JSON body from the request 32/// Extracts an `Block` JSON body from the request
35/// Accepts only JSON encoded `Block` body and rejects big payloads 33/// Accepts only JSON encoded `Block` body and rejects big payloads
36// TODO: find a good limit for this <11-04-21, yigit> //
37pub fn block_json_body() -> impl Filter<Extract = (Block,), Error = Rejection> + Clone { 34pub fn block_json_body() -> impl Filter<Extract = (Block,), Error = Rejection> + Clone {
38 warp::body::content_length_limit(1024 * 32).and(warp::body::json()) 35 warp::body::content_length_limit(1024 * 32).and(warp::body::json())
39} 36}