Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Fix CORS (#174)
Browse files Browse the repository at this point in the history
Fix CORS
Co-authored-by: Özgün Özerk <ozgun@subspace.network>
  • Loading branch information
nazar-pc committed Apr 25, 2022
1 parent d7bb8da commit 21dfc54
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src-tauri/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,17 @@ fn create_configuration<CS: ChainSpec + 'static>(
rpc_http: None,
rpc_ws: Some("127.0.0.1:9944".parse().expect("IP and port are valid")),
rpc_ipc: None,
rpc_methods: RpcMethods::Unsafe,
rpc_methods: RpcMethods::Safe,
rpc_ws_max_connections: None,
rpc_cors: None,
// Below CORS are default from Substrate
rpc_cors: Some(vec![
"http://localhost:*".to_string(),
"http://127.0.0.1:*".to_string(),
"https://localhost:*".to_string(),
"https://127.0.0.1:*".to_string(),
"https://polkadot.js.org".to_string(),
"tauri://localhost".to_string(),
]),
rpc_max_payload: None,
ws_max_out_buffer_capacity: None,
prometheus_config: None,
Expand Down

0 comments on commit 21dfc54

Please sign in to comment.