diff --git a/js/src/views/Dapps/dappsStore.js b/js/src/views/Dapps/dappsStore.js index 01877c38b..6a00ff059 100644 --- a/js/src/views/Dapps/dappsStore.js +++ b/js/src/views/Dapps/dappsStore.js @@ -197,24 +197,15 @@ export default class DappsStore { }); } - _fetchManifest (manifestHash, count = 0) { - return fetch(`${this._getHost()}/api/content/${manifestHash}/`) + _fetchManifest (manifestHash) { + return fetch(`${this._getHost()}/api/content/${manifestHash}/`, { redirect: 'follow', mode: 'cors' }) .then((response) => { - if (response.ok) { - return response.json(); - } - - if (count < 1) { - return this._fetchManifest(manifestHash, count + 1); - } - - return null; + return response.ok + ? response.json() + : null; }) - .catch(() => { - if (count < 1) { - return this._fetchManifest(manifestHash, count + 1); - } - + .catch((error) => { + console.warn('DappsStore:fetchManifest', error); return null; }); } diff --git a/js/webpack.config.js b/js/webpack.config.js index a85fefa9f..4413299fa 100644 --- a/js/webpack.config.js +++ b/js/webpack.config.js @@ -198,7 +198,8 @@ module.exports = { proxy: { '/api/*': { target: 'http://127.0.0.1:8080', - changeOrigin: true + changeOrigin: true, + autoRewrite: true }, '/app/*': { target: 'http://127.0.0.1:8080',