Skip to content

Commit

Permalink
Merge pull request #231 from germanferrero/issue-226-fix-access-from-…
Browse files Browse the repository at this point in the history
…different-node

fix(bug): fix access from different node
  • Loading branch information
gmarcos87 committed Feb 11, 2020
2 parents 94965d2 + 956b337 commit ff7ae29
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const rootEpics = combineEpics(...loadEpics(plugins));
export const store = createStore({},rootEpics,rootReducers, new UhttpdService());

// Init websocket
export const initStore = () => store.dispatch({ type: 'meta/CONECTION_START', payload: 'http://thisnode.info/ubus' });
export const initStore = () => store.dispatch({
type: 'meta/CONECTION_START',
payload: window.location.href.split('/').slice(0, 3).join('/').concat('/ubus')
});

export default store;

0 comments on commit ff7ae29

Please sign in to comment.