Fixing match
This commit is contained in:
parent
2e52c99042
commit
d54d3a2c60
@ -75,10 +75,10 @@ impl RpcServer {
|
|||||||
/// Start http server asynchronously and returns result with `Server` handle on success or an error.
|
/// Start http server asynchronously and returns result with `Server` handle on success or an error.
|
||||||
pub fn start_http(&self, addr: &SocketAddr, cors_domains: Vec<String>) -> Result<Server, RpcServerError> {
|
pub fn start_http(&self, addr: &SocketAddr, cors_domains: Vec<String>) -> Result<Server, RpcServerError> {
|
||||||
let cors_domains = cors_domains.into_iter()
|
let cors_domains = cors_domains.into_iter()
|
||||||
.map(|v| match v {
|
.map(|v| match v.as_str() {
|
||||||
ref v if v == "*" => jsonrpc_http_server::AccessControlAllowOrigin::Any,
|
"*" => jsonrpc_http_server::AccessControlAllowOrigin::Any,
|
||||||
ref v if v == "null" => jsonrpc_http_server::AccessControlAllowOrigin::Null,
|
"null" => jsonrpc_http_server::AccessControlAllowOrigin::Null,
|
||||||
v => jsonrpc_http_server::AccessControlAllowOrigin::Value(v),
|
v => jsonrpc_http_server::AccessControlAllowOrigin::Value(v.into()),
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
Server::start(addr, self.handler.clone(), cors_domains)
|
Server::start(addr, self.handler.clone(), cors_domains)
|
||||||
|
Loading…
Reference in New Issue
Block a user