From 999d65bda0d0e145fe0751b180c4070040e9910c Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Mon, 24 Sep 2018 20:50:27 -0500 Subject: [PATCH 1/3] whitespace --- lib/modules/storage/storageProcessesLauncher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/modules/storage/storageProcessesLauncher.js b/lib/modules/storage/storageProcessesLauncher.js index 79b9a3b8..0aa17df1 100644 --- a/lib/modules/storage/storageProcessesLauncher.js +++ b/lib/modules/storage/storageProcessesLauncher.js @@ -39,12 +39,12 @@ class StorageProcessesLauncher { else corsParts.push('http://localhost:8000'); } - // add all dapp connection storage + // add all dapp connection storage if(this.storageConfig.enabled) { this.storageConfig.dappConnection.forEach(dappConn => { if(dappConn.provider === storageName) return; // do not add CORS URL for ourselves if(dappConn.getUrl || dappConn.host){ - + // if getUrl is specified in the config, that needs to be included in cors // instead of the concatenated protocol://host:port if(dappConn.getUrl) { From cad7843c78c4314599d10af094a5bd2c34f72836 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Mon, 24 Sep 2018 20:51:31 -0500 Subject: [PATCH 2/3] add CORS URL for local ipfs' own server (default: localhost:8080) --- lib/modules/storage/storageProcessesLauncher.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/modules/storage/storageProcessesLauncher.js b/lib/modules/storage/storageProcessesLauncher.js index 0aa17df1..105c3770 100644 --- a/lib/modules/storage/storageProcessesLauncher.js +++ b/lib/modules/storage/storageProcessesLauncher.js @@ -42,7 +42,6 @@ class StorageProcessesLauncher { // add all dapp connection storage if(this.storageConfig.enabled) { this.storageConfig.dappConnection.forEach(dappConn => { - if(dappConn.provider === storageName) return; // do not add CORS URL for ourselves if(dappConn.getUrl || dappConn.host){ // if getUrl is specified in the config, that needs to be included in cors From 16246b1d438d447913f4e67eca498444301367c0 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Mon, 24 Sep 2018 21:07:02 -0500 Subject: [PATCH 3/3] rm unneeded param/arg --- lib/modules/storage/storageProcessesLauncher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/modules/storage/storageProcessesLauncher.js b/lib/modules/storage/storageProcessesLauncher.js index 105c3770..7b2cd596 100644 --- a/lib/modules/storage/storageProcessesLauncher.js +++ b/lib/modules/storage/storageProcessesLauncher.js @@ -28,7 +28,7 @@ class StorageProcessesLauncher { }); } - buildCors(storageName) + buildCors() { let corsParts = []; // add our webserver CORS @@ -113,7 +113,7 @@ class StorageProcessesLauncher { action: constants.blockchain.init, options: { storageConfig: self.storageConfig, blockchainConfig: self.blockchainConfig, - cors: self.buildCors(storageName) + cors: self.buildCors() } });