feat: Configure a 10GB body limit for uploads and enhance attachment processing with a 100MB image size cap and improved error handling.
This commit is contained in:
@@ -120,7 +120,8 @@ async fn main() {
|
||||
.route("/__attachments/{id}", get(handlers::attachments::serve_attachment))
|
||||
.nest("/__dungeon", handlers::router(&app_state)) // I'll create a single `handlers::router`
|
||||
.with_state(app_state.clone())
|
||||
.layer(axum::extract::DefaultBodyLimit::disable())
|
||||
.layer(axum::extract::DefaultBodyLimit::max(10 * 1024 * 1024 * 1024)) // 10GB limit to be safe
|
||||
|
||||
.layer(tower_http::trace::TraceLayer::new_for_http());
|
||||
|
||||
let listener = TcpListener::bind(&addr).await.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user