Skip to content

Commit

Permalink
Merge pull request #232 from 1000TurquoisePogs/feature/support-api
Browse files Browse the repository at this point in the history
Support ws under api root
  • Loading branch information
1000TurquoisePogs authored May 28, 2020
2 parents 997982a + 37890ac commit b3183e1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bootstrap/src/uri/mvd-uri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,15 @@ export class MvdUri implements ZLUX.UriBroker {
+ `services/${serviceName}/${version}/${relativePath}`;
// 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;
if (proxy_mode) {
if (uri.startsWith('/api/')) {
return uri.replace('/api/', '/ws/');
} else {
return uri.replace('/ui/', '/ws/');
}
} else {
return uri;
}
}

/**
Expand Down

0 comments on commit b3183e1

Please sign in to comment.