Increase req body limit (#2965)

force merging this since it has been going back and forth for so long
This commit is contained in:
Shodipo Ayomide
2025-07-31 21:23:09 +01:00
committed by GitHub
parent 14ee888832
commit 26cb85094f
2 changed files with 14 additions and 3 deletions
+9 -3
View File
@@ -1,7 +1,7 @@
use super::utils::verify_secret_key;
use crate::state::AppState;
use axum::{
extract::State,
extract::{DefaultBodyLimit, State},
http::{self, HeaderMap, StatusCode},
response::IntoResponse,
routing::post,
@@ -400,9 +400,15 @@ async fn submit_tool_result(
pub fn routes(state: Arc<AppState>) -> Router {
Router::new()
.route("/reply", post(reply_handler))
.route(
"/reply",
post(reply_handler).layer(DefaultBodyLimit::max(50 * 1024 * 1024)),
)
.route("/confirm", post(confirm_permission))
.route("/tool_result", post(submit_tool_result))
.route(
"/tool_result",
post(submit_tool_result).layer(DefaultBodyLimit::max(10 * 1024 * 1024)),
)
.with_state(state)
}