Skip to content

Commit

Permalink
fix(router): payload limit was not correctly applied
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierDehaene committed Jun 21, 2024
1 parent dbefcd8 commit 9e2efa7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions router/src/http/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,6 @@ pub async fn run(

// Create router
let mut app = Router::new()
.layer(DefaultBodyLimit::max(payload_limit))
.merge(SwaggerUi::new("/docs").url("/api-doc/openapi.json", doc))
// Base routes
.route("/info", get(get_model_info))
Expand All @@ -1474,7 +1473,9 @@ pub async fn run(
// AWS Sagemaker health route
.route("/ping", get(health))
// Prometheus metrics route
.route("/metrics", get(metrics));
.route("/metrics", get(metrics))
// Update payload limit
.layer(DefaultBodyLimit::max(payload_limit));

#[cfg(feature = "google")]
{
Expand Down

0 comments on commit 9e2efa7

Please sign in to comment.