From 9d9ea02159ad90e47e7da2b18aa24ca51a90f0a7 Mon Sep 17 00:00:00 2001 From: Shunsuke Watanabe Date: Thu, 15 Dec 2022 17:17:53 +0900 Subject: [PATCH] Allow contracts ui cors origin (#52) Allow CORS origin `https://contracts-ui.substrate.io/`. Others are the same as before. --- packages/cli/src/commands/node/start.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/commands/node/start.ts b/packages/cli/src/commands/node/start.ts index 14d0bda4..4bf5dd7f 100644 --- a/packages/cli/src/commands/node/start.ts +++ b/packages/cli/src/commands/node/start.ts @@ -20,7 +20,9 @@ export class StartNode extends Command { const config = await getSwankyConfig(); // run persistent mode by default. non-persistent mode in case flag is provided. - await execa.command(`${config.node.localPath} ${flags.tmp ? "--dev" : ""}`, { + await execa.command(`${config.node.localPath} \ + --rpc-cors http://localhost:*,http://127.0.0.1:*,https://localhost:*,https://127.0.0.1:*,https://polkadot.js.org,https://contracts-ui.substrate.io/ \ + ${flags.tmp ? "--dev" : ""}`, { stdio: "inherit", });