diff --git a/webapp/components/options.jsx b/webapp/components/options.jsx index 162e928..3d3e43a 100644 --- a/webapp/components/options.jsx +++ b/webapp/components/options.jsx @@ -7,7 +7,9 @@ module.exports = { } catch (e) { // Do nothing } - if (opt === null || opt === undefined) opt = { addr: 'localhost', port: 5001 } + if (opt === null || opt === undefined) { + opt = { addr: window.location.hostname, port: window.location.port } + } return opt } } diff --git a/webapp/pages/settings.jsx b/webapp/pages/settings.jsx index 13d164a..e15c6b9 100644 --- a/webapp/pages/settings.jsx +++ b/webapp/pages/settings.jsx @@ -4,7 +4,7 @@ var Icon = require('icon.jsx') module.exports = function (boardsAPI) { return React.createClass({ getDefaults: function () { - return { addr: 'localhost', port: 5001, api: false } + return { addr: window.location.hostname, port: window.location.port, api: false } }, getInitialState: function () { var s = window.localStorage.getItem('ipfs-boards-settings')