Skip to content

Commit

Permalink
100mb body limit size
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Sep 28, 2023
1 parent 78a5312 commit cf3e0fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::models::MIGRATIONS;
use crate::routes::*;
use axum::extract::DefaultBodyLimit;
use axum::headers::Origin;
use axum::http::{request::Parts, HeaderValue, Method, StatusCode, Uri};
use axum::routing::{get, post, put};
Expand Down Expand Up @@ -129,6 +130,7 @@ async fn main() -> anyhow::Result<()> {
Method::OPTIONS,
]),
)
.layer(DefaultBodyLimit::max(100_000_000)) // max 100mb body size
.layer(Extension(state));

let server = axum::Server::bind(&addr).serve(server_router.into_make_service());
Expand Down

0 comments on commit cf3e0fd

Please sign in to comment.