Skip to content

Commit

Permalink
increased max request size
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-devv committed Feb 28, 2024
1 parent 66ee740 commit e052a40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/edgen_server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#![deny(unsafe_code)]
#![warn(missing_docs)]

use axum::extract::DefaultBodyLimit;
use core::future::IntoFuture;
use std::process::exit;
use std::sync::atomic::{AtomicBool, Ordering};
Expand Down Expand Up @@ -190,7 +191,9 @@ async fn run_server(args: &cli::Serve) -> Result<bool, error::EdgenError> {
)
.await;

let http_app = routes::routes().layer(CorsLayer::permissive());
let http_app = routes::routes()
.layer(CorsLayer::permissive())
.layer(DefaultBodyLimit::max(1024 * 1024 * 1024));

let uri_vector = if !args.uri.is_empty() {
info!("Overriding default URI");
Expand Down

0 comments on commit e052a40

Please sign in to comment.