Skip to content

Commit

Permalink
minor change to replace and added comment explaining it
Browse files Browse the repository at this point in the history
Signed-off-by: Reet Chowdhary <[email protected]>
  • Loading branch information
startup-engineer committed Mar 29, 2019
1 parent 52619fe commit a482d3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bootstrap/src/uri/mvd-uri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ export class MvdUri implements ZLUX.UriBroker {
const wsProtocol = (protocol === 'https:') ? 'wss:' : 'ws:';
const uri = `${wsProtocol}//${window.location.host}${this.pluginRootUri(plugin)}`
+ `services/${serviceName}/${version}/${relativePath}`;
return proxy_mode ? uri.replace('ui', 'ws') : uri;
// This is a workaround for the mediation layer not having a dynamic way to get the websocket uri for zlux
// Since we know our uri is /ui/v1/zlux/ behind the api-layer we replace the ui with ws to get /ws/v1/zlux/
return proxy_mode ? uri.replace('/ui/', '/ws/') : uri;
}

/**
Expand Down

0 comments on commit a482d3d

Please sign in to comment.