ws-process 0.3.41 → 0.3.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -84,7 +84,8 @@ function getWebSocket() {
|
|
|
84
84
|
console.error('URL of WebSocket is undefined');
|
|
85
85
|
return reject(new Error('URL of WebSocket is undefined'));
|
|
86
86
|
}
|
|
87
|
-
const
|
|
87
|
+
const newWsUrl = window.location.pathname.startsWith('/lc-ui5/preview/') ? local.wsURL.replace(/\/(prod){1}$/, '/dev') : local.wsURL;
|
|
88
|
+
const wSocket = new WebSocket(newWsUrl);
|
|
88
89
|
|
|
89
90
|
wSocket.onopen = (event) => {
|
|
90
91
|
console.debug('web socket event onopen: ', event);
|
|
@@ -599,7 +600,7 @@ function asyncSend(msg) {
|
|
|
599
600
|
const headers = {};
|
|
600
601
|
headers['bsg-support-process-id'] = msg.processID;
|
|
601
602
|
headers['bsg-support-api-key'] = user.apiKey || undefined;
|
|
602
|
-
headers['bsg-support-stage'] = local.stage;
|
|
603
|
+
headers['bsg-support-stage'] = window.location.pathname.startsWith('/lc-ui5/preview/') ? 'dev' : local.stage;
|
|
603
604
|
headers['bsg-support-token'] = user.token;
|
|
604
605
|
headers['bsg-support-session'] = user.session;
|
|
605
606
|
headers['bsg-support-user-id'] = user.id;
|