mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-26 15:12:05 +00:00
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 = [];
|
||||
// add our webserver CORS
|
||||
@ -39,12 +39,11 @@ 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) {
|
||||
@ -114,7 +113,7 @@ class StorageProcessesLauncher {
|
||||
action: constants.blockchain.init, options: {
|
||||
storageConfig: self.storageConfig,
|
||||
blockchainConfig: self.blockchainConfig,
|
||||
cors: self.buildCors(storageName)
|
||||
cors: self.buildCors()
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user