File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ mod validator;
5555use option:: CONFIG ;
5656
5757// Global configurations
58- const MAX_EVENT_PAYLOAD_SIZE : usize = 1024000 ;
58+ const MAX_EVENT_PAYLOAD_SIZE : usize = 10240000 ;
5959const API_BASE_PATH : & str = "/api" ;
6060const API_VERSION : & str = "v1" ;
6161
@@ -261,7 +261,11 @@ pub fn configure_routes(cfg: &mut web::ServiceConfig) {
261261 // POST "/query" ==> Get results of the SQL query passed in request body
262262 . service ( web:: resource ( query_path ( ) ) . route ( web:: post ( ) . to ( handlers:: event:: query) ) )
263263 // POST "/ingest" ==> Post logs to given log stream based on header
264- . service ( web:: resource ( ingest_path ( ) ) . route ( web:: post ( ) . to ( handlers:: event:: ingest) ) )
264+ . service (
265+ web:: resource ( ingest_path ( ) )
266+ . route ( web:: post ( ) . to ( handlers:: event:: ingest) )
267+ . app_data ( web:: JsonConfig :: default ( ) . limit ( MAX_EVENT_PAYLOAD_SIZE ) ) ,
268+ )
265269 . service (
266270 // logstream API
267271 web:: resource ( logstream_path ( "{logstream}" ) )
You can’t perform that action at this time.
0 commit comments