diff --git a/crates/sui-json-rpc-api/src/lib.rs b/crates/sui-json-rpc-api/src/lib.rs index 4e7072c73f07e..3f14c38516083 100644 --- a/crates/sui-json-rpc-api/src/lib.rs +++ b/crates/sui-json-rpc-api/src/lib.rs @@ -337,6 +337,7 @@ pub fn read_size_from_env(var_name: &str) -> Option { .ok() } +pub const CLIENT_REQUEST_METHOD_HEADER: &str = "client-request-method"; pub const CLIENT_SDK_TYPE_HEADER: &str = "client-sdk-type"; /// The version number of the SDK itself. This can be different from the API version. pub const CLIENT_SDK_VERSION_HEADER: &str = "client-sdk-version"; diff --git a/crates/sui-json-rpc/src/lib.rs b/crates/sui-json-rpc/src/lib.rs index 3075471af9d1b..d9704bbcef767 100644 --- a/crates/sui-json-rpc/src/lib.rs +++ b/crates/sui-json-rpc/src/lib.rs @@ -25,7 +25,8 @@ pub use balance_changes::*; pub use object_changes::*; pub use sui_config::node::ServerType; use sui_json_rpc_api::{ - CLIENT_SDK_TYPE_HEADER, CLIENT_SDK_VERSION_HEADER, CLIENT_TARGET_API_VERSION_HEADER, + CLIENT_REQUEST_METHOD_HEADER, CLIENT_SDK_TYPE_HEADER, CLIENT_SDK_VERSION_HEADER, + CLIENT_TARGET_API_VERSION_HEADER, }; use sui_open_rpc::{Module, Project}; @@ -121,6 +122,7 @@ impl JsonRpcServerBuilder { HeaderName::from_static(CLIENT_SDK_VERSION_HEADER), HeaderName::from_static(CLIENT_TARGET_API_VERSION_HEADER), HeaderName::from_static(APP_NAME_HEADER), + HeaderName::from_static(CLIENT_REQUEST_METHOD_HEADER), ]); Ok(cors) }