Skip to content

Commit

Permalink
Add variables to configure WebSocket host and protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
kharus committed Oct 2, 2023
1 parent 45ffb0f commit 1a2190f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ if (process.env.CCLAW_HTTPS) {
}
}

const wsProxyHostname = process.env.WS_PROXY_HOSTNAME ? process.env.WS_PROXY_HOSTNAME : 'cclaw.legalese.com';
const wsProxyProtocol = process.env.WS_PROXY_PROTOCOL ? process.env.WS_PROXY_PROTOCOL : 'wss';

if (process.env.LEGALSS_PROXY_PORT) {
module.exports.devServer.client = {
webSocketURL: `wss://cclaw.legalese.com/port/${process.env.LEGALSS_PROXY_PORT}/ws`
}
webSocketURL: `${wsProxyProtocol}://${wsProxyHostname}/port/${process.env.LEGALSS_PROXY_PORT}/ws`,
};
}

0 comments on commit 1a2190f

Please sign in to comment.