mirror of https://github.com/embarklabs/embark.git
Merge pull request #904 from embark-framework/bug_fix/ipfs-own-cors
add CORS URL for local ipfs' own server
This commit is contained in:
commit
b4dc48dc32
|
@ -28,7 +28,7 @@ class StorageProcessesLauncher {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
buildCors(storageName)
|
buildCors()
|
||||||
{
|
{
|
||||||
let corsParts = [];
|
let corsParts = [];
|
||||||
// add our webserver CORS
|
// add our webserver CORS
|
||||||
|
@ -42,7 +42,6 @@ class StorageProcessesLauncher {
|
||||||
// add all dapp connection storage
|
// add all dapp connection storage
|
||||||
if(this.storageConfig.enabled) {
|
if(this.storageConfig.enabled) {
|
||||||
this.storageConfig.dappConnection.forEach(dappConn => {
|
this.storageConfig.dappConnection.forEach(dappConn => {
|
||||||
if(dappConn.provider === storageName) return; // do not add CORS URL for ourselves
|
|
||||||
if(dappConn.getUrl || dappConn.host){
|
if(dappConn.getUrl || dappConn.host){
|
||||||
|
|
||||||
// if getUrl is specified in the config, that needs to be included in cors
|
// if getUrl is specified in the config, that needs to be included in cors
|
||||||
|
@ -114,7 +113,7 @@ class StorageProcessesLauncher {
|
||||||
action: constants.blockchain.init, options: {
|
action: constants.blockchain.init, options: {
|
||||||
storageConfig: self.storageConfig,
|
storageConfig: self.storageConfig,
|
||||||
blockchainConfig: self.blockchainConfig,
|
blockchainConfig: self.blockchainConfig,
|
||||||
cors: self.buildCors(storageName)
|
cors: self.buildCors()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue