Skip to content

Commit 901a0d4

Browse files
fix(router): payload limit was not correctly applied (#298)
1 parent a704322 commit 901a0d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

router/src/http/server.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,6 @@ pub async fn run(
14511451

14521452
// Create router
14531453
let mut app = Router::new()
1454-
.layer(DefaultBodyLimit::max(payload_limit))
14551454
.merge(SwaggerUi::new("/docs").url("/api-doc/openapi.json", doc))
14561455
// Base routes
14571456
.route("/info", get(get_model_info))
@@ -1474,7 +1473,9 @@ pub async fn run(
14741473
// AWS Sagemaker health route
14751474
.route("/ping", get(health))
14761475
// Prometheus metrics route
1477-
.route("/metrics", get(metrics));
1476+
.route("/metrics", get(metrics))
1477+
// Update payload limit
1478+
.layer(DefaultBodyLimit::max(payload_limit));
14781479

14791480
#[cfg(feature = "google")]
14801481
{

0 commit comments

Comments
 (0)