diff options
author | Yigit Sever | 2021-04-16 01:48:04 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-16 01:48:04 +0300 |
commit | 68dfbf31e94d335e8472cd139bc93681432bf2b4 (patch) | |
tree | 61c1cb3812bd7211da49d3617f3dd7cc4e29961c | |
parent | 6952da3ace3adde1c987f5f2a0ea9464d3e93b4e (diff) | |
download | gradecoin-68dfbf31e94d335e8472cd139bc93681432bf2b4.tar.gz gradecoin-68dfbf31e94d335e8472cd139bc93681432bf2b4.tar.bz2 gradecoin-68dfbf31e94d335e8472cd139bc93681432bf2b4.zip |
Give up on content length
-rw-r--r-- | src/custom_filters.rs | 3 |
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> // | ||
15 | pub fn auth_request_json_body( | 14 | pub 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> // | ||
23 | pub fn transaction_json_body() -> impl Filter<Extract = (Transaction,), Error = Rejection> + Clone { | 21 | pub 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> // | ||
37 | pub fn block_json_body() -> impl Filter<Extract = (Block,), Error = Rejection> + Clone { | 34 | pub 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 | } |