mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-26 23:58:46 -05:00
chore(cli): Add warning for misconfigured HTTP API flags (#11360)
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
This commit is contained in:
@@ -6,7 +6,7 @@ use reth_rpc_eth_types::{EthConfig, EthStateCacheConfig, GasPriceOracleConfig};
|
||||
use reth_rpc_layer::{JwtError, JwtSecret};
|
||||
use reth_rpc_server_types::RpcModuleSelection;
|
||||
use tower::layer::util::Identity;
|
||||
use tracing::debug;
|
||||
use tracing::{debug, warn};
|
||||
|
||||
use crate::{
|
||||
auth::AuthServerConfig, error::RpcError, IpcServerBuilder, RpcModuleConfig, RpcServerConfig,
|
||||
@@ -168,6 +168,13 @@ impl RethRpcServerConfig for RpcServerArgs {
|
||||
fn rpc_server_config(&self) -> RpcServerConfig {
|
||||
let mut config = RpcServerConfig::default().with_jwt_secret(self.rpc_secret_key());
|
||||
|
||||
if self.http_api.is_some() && !self.http {
|
||||
warn!(
|
||||
target: "reth::cli",
|
||||
"The --http.api flag is set but --http is not enabled. HTTP RPC API will not be exposed."
|
||||
);
|
||||
}
|
||||
|
||||
if self.http {
|
||||
let socket_address = SocketAddr::new(self.http_addr, self.http_port);
|
||||
config = config
|
||||
|
||||
Reference in New Issue
Block a user