diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml
index 6ff4efd51d..abc6743a4c 100644
--- a/rpc/Cargo.toml
+++ b/rpc/Cargo.toml
@@ -45,7 +45,7 @@ async-trait = "0.1"
axum = "0.6.20"
tokio-util = { version = "0.7.3", features = ["codec"] }
futures-util = { version = "0.3.21" }
-tower-http = { version = "0.3.5", features = ["timeout"] }
+tower-http = { version = "0.3.5", features = ["timeout", "cors"] }
async-stream = "0.3.3"
ckb-async-runtime = { path = "../util/runtime", version = "= 0.114.0-pre" }
diff --git a/rpc/src/server.rs b/rpc/src/server.rs
index 08550d9730..c0c448a280 100644
--- a/rpc/src/server.rs
+++ b/rpc/src/server.rs
@@ -17,6 +17,7 @@ use std::sync::Arc;
use std::time::Duration;
use tokio::net::TcpListener;
use tokio_util::codec::{FramedRead, FramedWrite, LinesCodec, LinesCodecError};
+use tower_http::cors::CorsLayer;
use tower_http::timeout::TimeoutLayer;
#[doc(hidden)]
@@ -87,6 +88,8 @@ impl RpcServer {
.with_channel_size(4)
.with_pipeline_size(4);
+ let cors = CorsLayer::permissive();
+
// HTTP and WS server.
let method_router =
post(handle_jsonrpc::