Enable CORS checks (#2248)

* Introduce CORS CLI flags.

* Fix test.
This commit is contained in:
Tomasz Drwięga
2019-04-10 23:47:27 +02:00
committed by Bastian Köcher
parent 0b2c3ae860
commit 25f56283b1
7 changed files with 54 additions and 6 deletions
+2 -2
View File
@@ -160,7 +160,7 @@ impl<Components: components::Components> Service<Components> {
warn!("Using default protocol ID {:?} because none is configured in the \
chain specs", DEFAULT_PROTOCOL_ID
);
DEFAULT_PROTOCOL_ID
DEFAULT_PROTOCOL_ID
}
}.as_bytes();
let mut protocol_id = network::ProtocolId::default();
@@ -301,7 +301,7 @@ impl<Components: components::Components> Service<Components> {
};
let rpc = Components::RuntimeServices::start_rpc(
client.clone(), network.clone(), has_bootnodes, system_info, config.rpc_http,
config.rpc_ws, task_executor.clone(), transaction_pool.clone(),
config.rpc_ws, config.rpc_cors.clone(), task_executor.clone(), transaction_pool.clone(),
)?;
// Telemetry