From 68c8b0e769c8827c1a4241b40b83baf9bc455ddb Mon Sep 17 00:00:00 2001 From: Eric Zhang Date: Wed, 12 Feb 2025 15:36:41 -0500 Subject: [PATCH] Fix RFC 8441 (WebSocket over http/2) issue This resolves #122 after a change in Axum 0.8.0. See the issue for an explanation of what happened. --- crates/sshx-server/src/web.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/sshx-server/src/web.rs b/crates/sshx-server/src/web.rs index dcaae05..d744393 100644 --- a/crates/sshx-server/src/web.rs +++ b/crates/sshx-server/src/web.rs @@ -2,7 +2,7 @@ use std::sync::Arc; -use axum::routing::{get, get_service}; +use axum::routing::{any, get_service}; use axum::Router; use tower_http::services::{ServeDir, ServeFile}; @@ -30,5 +30,5 @@ pub fn app() -> Router> { /// Routes for the backend web API server. fn backend() -> Router> { - Router::new().route("/s/{name}", get(socket::get_session_ws)) + Router::new().route("/s/{name}", any(socket::get_session_ws)) }