Skip to content

Commit cda8e39

Browse files
committed
chore: update route syntax for Axum 0.8 (:param → {param})
Signed-off-by: Xin Liu <[email protected]>
1 parent ef66cda commit cda8e39

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ async fn main() -> anyhow::Result<()> {
8484
let app = Router::new()
8585
// Health check endpoint
8686
.route("/health", get(health_check))
87-
// WebSocket proxy: /ws/:session_id
88-
.route("/ws/:session_id", get(websocket_handler))
87+
// WebSocket proxy: /ws/{session_id}
88+
.route("/ws/{session_id}", get(websocket_handler))
8989
.with_state(ws_state)
90-
// HTTP/HTTPS proxy: /:session_id/*path
91-
.route("/:session_id/*path", any(http_proxy_handler))
90+
// HTTP/HTTPS proxy: /{session_id}/*path
91+
.route("/{session_id}/*path", any(http_proxy_handler))
9292
.with_state(http_state)
9393
// Add request tracing
9494
.layer(TraceLayer::new_for_http());

0 commit comments

Comments
 (0)