diff options
Diffstat (limited to 'src/custom_filters.rs')
-rw-r--r-- | src/custom_filters.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/custom_filters.rs b/src/custom_filters.rs index 315ba4a..f93f572 100644 --- a/src/custom_filters.rs +++ b/src/custom_filters.rs | |||
@@ -20,6 +20,10 @@ pub fn transaction_json_body() -> impl Filter<Extract = (Transaction,), Error = | |||
20 | warp::body::content_length_limit(1024 * 32).and(warp::body::json()) | 20 | warp::body::content_length_limit(1024 * 32).and(warp::body::json()) |
21 | } | 21 | } |
22 | 22 | ||
23 | pub fn auth_header() -> impl Filter<Extract = (String,), Error = Rejection> + Clone { | ||
24 | warp::header::header::<String>("Authorization") | ||
25 | } | ||
26 | |||
23 | // Accept only json encoded Block body and reject big payloads | 27 | // Accept only json encoded Block body and reject big payloads |
24 | // TODO: find a good limit for this <11-04-21, yigit> // | 28 | // TODO: find a good limit for this <11-04-21, yigit> // |
25 | pub fn block_json_body() -> impl Filter<Extract = (Block,), Error = Rejection> + Clone { | 29 | pub fn block_json_body() -> impl Filter<Extract = (Block,), Error = Rejection> + Clone { |