Skip to content

Commit c1b3ff2

Browse files
Yelyzaveta Dymchenkovfusco
Yelyzaveta Dymchenko
authored andcommitted
feat: increase actix-web JsonConfig limit
1 parent 1ae7f44 commit c1b3ff2

File tree

2 files changed

+44
-4
lines changed

2 files changed

+44
-4
lines changed

rollup-http/rollup-http-server/Cargo.lock

+41-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rollup-http/rollup-http-server/src/http_service.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use std::sync::Arc;
1818

1919
use actix_web::{middleware::Logger, web::Data, App, HttpResponse, HttpServer, http::header::CONTENT_TYPE};
20-
use actix_web_validator::Json;
20+
use actix_web_validator::{Json, JsonConfig};
2121
use async_mutex::Mutex;
2222
use serde::{Deserialize, Serialize};
2323
use serde_json::json;
@@ -48,8 +48,10 @@ pub fn create_server(
4848
let data = Data::new(Mutex::new(Context {
4949
rollup_fd: rollup_fd.clone(),
5050
}));
51+
let json_cfg = JsonConfig::default().limit(5 << 20);
5152
App::new()
5253
.app_data(data)
54+
.app_data(json_cfg)
5355
.wrap(Logger::default())
5456
.service(voucher)
5557
.service(notice)

0 commit comments

Comments
 (0)