File tree Expand file tree Collapse file tree
libsql-server/src/http/user Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -431,13 +431,19 @@ where
431431 . with_state ( state) ;
432432
433433 // Merge the grpc based axum router into our regular http router
434- let replication = ReplicationLogServer :: new ( self . replication_service ) ;
435- let write_proxy = ProxyServer :: new ( self . proxy_service ) ;
434+ let replication = ReplicationLogServer :: new ( self . replication_service . clone ( ) ) ;
435+ let write_proxy = ProxyServer :: new ( self . proxy_service . clone ( ) ) ;
436+
437+ // Add native gRPC services (HTTP/2) alongside gRPC-Web (HTTP/1.1)
438+ let native_replication = ReplicationLogServer :: new ( self . replication_service ) ;
439+ let native_write_proxy = ProxyServer :: new ( self . proxy_service ) ;
436440
437441 let grpc_router = Server :: builder ( )
438442 . accept_http1 ( true )
439443 . add_service ( tonic_web:: enable ( replication) )
440- . add_service ( tonic_web:: enable ( write_proxy) ) ;
444+ . add_service ( tonic_web:: enable ( write_proxy) )
445+ . add_service ( native_replication)
446+ . add_service ( native_write_proxy) ;
441447 // Convert to axum Router - into_router() is deprecated but functional
442448 #[ allow( deprecated) ]
443449 let grpc_router = grpc_router. into_router ( ) ;
You can’t perform that action at this time.
0 commit comments