Skip to content

Commit

Permalink
feat: increase actix-web JsonConfig limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Yelyzaveta Dymchenko committed Sep 16, 2024
1 parent 1fbaccc commit 0d09389
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
44 changes: 41 additions & 3 deletions rollup-http/rollup-http-server/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion rollup-http/rollup-http-server/src/http_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use std::sync::Arc;

use actix_web::{middleware::Logger, web::Data, App, HttpResponse, HttpServer, http::header::CONTENT_TYPE};
use actix_web_validator::Json;
use actix_web_validator::{Json, JsonConfig};
use async_mutex::Mutex;
use serde::{Deserialize, Serialize};
use serde_json::json;
Expand Down Expand Up @@ -48,8 +48,10 @@ pub fn create_server(
let data = Data::new(Mutex::new(Context {
rollup_fd: rollup_fd.clone(),
}));
let json_cfg = JsonConfig::default().limit(5242880);
App::new()
.app_data(data)
.app_data(json_cfg)
.wrap(Logger::default())
.service(voucher)
.service(notice)
Expand Down

0 comments on commit 0d09389

Please sign in to comment.