Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(rpc): apply auth middleware to fallback routes

Steven Enamakeldbcdf96b0c0f
diff --git a/crates/openhuman-rpc/src/server/http/mod.rs b/crates/openhuman-rpc/src/server/http/mod.rs
index 213cca1ff3..bedbe682c2 100644
--- a/crates/openhuman-rpc/src/server/http/mod.rs
+++ b/crates/openhuman-rpc/src/server/http/mod.rs
@@ -85,7 +85,7 @@ pub fn build_core_http_router(socketio_enabled: bool) -> Router {
let router = router
.fallback(not_found_handler)
.layer(middleware::from_fn(http_request_log_middleware))
- .route_layer(middleware::from_fn(
+ .layer(middleware::from_fn(
crate::server::auth::rpc_auth_middleware,
));
// Socket.IO is off (`--jsonrpc-only`): answer its path before the bearer