File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ async fn app() -> Result<Router> {
164164 . nest ( "/backups" , routes:: backups:: routes ( mc. clone ( ) ) )
165165 . nest ( "/plugins" , routes:: plugins:: routes ( mc. clone ( ) ) )
166166 . nest ( "/sse" , routes:: sse:: routes ( mc. clone ( ) ) )
167+ . route ( "/socket.io/" , axum:: routing:: any ( socket_io_fallback) )
167168 . fallback ( fallback)
168169 . layer ( middleware:: from_fn ( mw_range:: mw_range) )
169170 //.layer(middleware::map_response(main_response_mapper))
@@ -183,6 +184,11 @@ async fn fallback(uri: Uri) -> (StatusCode, &'static str) {
183184 log_info ( LogServiceType :: Other , format ! ( "Route not found: {}" , uri) ) ;
184185 ( StatusCode :: NOT_FOUND , "Not Found" )
185186}
187+
188+ /// Silent 404 for deprecated socket.io endpoint (old clients still call it)
189+ async fn socket_io_fallback ( ) -> StatusCode {
190+ StatusCode :: NOT_FOUND
191+ }
186192struct RegisterInfo {
187193 cert_paths : Option < ( PathBuf , PathBuf ) > ,
188194 ips : Option < ServerIpInfo >
You can’t perform that action at this time.
0 commit comments