Skip to content

Commit

Permalink
[fix] Websocket connection should use OPENWISP_NETWORK_TOPOLOGY_API_B…
Browse files Browse the repository at this point in the history
…ASEURL
  • Loading branch information
pandafy committed Nov 26, 2024
1 parent d12c658 commit 1422251
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
loadNetJsonGraph = (el='body', url='{{ graph_url }}?include_unpublished=true') => {
const history_url = '{{ history_url }}?include_unpublished=true';
const wsProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const wsUrl = `${wsProtocol}//${window.location.host}/ws/network-topology/topology/${getTopologyIdFromUrl()}/`;
const apiHost = new URL('{{ graph_url }}').host;
const wsUrl = `${wsProtocol}//${apiHost}/ws/network-topology/topology/${getTopologyIdFromUrl()}/`;
const socket = new WebSocket(wsUrl);

const getDataParseOptions = (data) => {
Expand Down

0 comments on commit 1422251

Please sign in to comment.