diff --git a/rpc/src/server.rs b/rpc/src/server.rs
index 6d943211d5..07a4c20eed 100644
--- a/rpc/src/server.rs
+++ b/rpc/src/server.rs
@@ -1,11 +1,13 @@
use crate::IoHandler;
-use axum::routing::post;
+use axum::response::IntoResponse;
+use axum::routing::{get, post};
use axum::{Extension, Router};
use ckb_app_config::RpcConfig;
use ckb_async_runtime::Handle;
use ckb_error::AnyError;
use ckb_logger::info;
+use axum::http::StatusCode;
use ckb_stop_handler::{new_tokio_exit_rx, CancellationToken};
use futures_util::{SinkExt, TryStreamExt};
use jsonrpc_core::MetaIoHandler;
@@ -90,14 +92,22 @@ impl RpcServer {
.with_pipeline_size(4);
// HTTP and WS server.
- let method_router =
- post(handle_jsonrpc::