Skip to content

Commit

Permalink
increase request payload limits
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloose committed Sep 29, 2024
1 parent 4d4acdf commit 72f4053
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
use dotenvy::dotenv;
use lazy_static::lazy_static;
use rocket::{config::Ident, Config};
use rocket::{
config::Ident,
data::{Limits, ToByteUnit},
Config,
};
use serde_json::json;

#[macro_use]
Expand Down Expand Up @@ -45,6 +49,9 @@ async fn main() -> Result<(), rocket::Error> {
port: PORT,
address: [0, 0, 0, 0].into(),
ident: Ident::none(),
limits: Limits::new()
.limit("forms", 16.mebibytes())
.limit("json", 32.mebibytes()),
..Config::default()
};

Expand Down

0 comments on commit 72f4053

Please sign in to comment.