mirror of
https://github.com/fazo96/ipfs-boards
synced 2025-01-24 14:44:19 +01:00
use gateway api by default
This commit is contained in:
parent
aecf89339c
commit
34da7fcc07
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user