Skip to content

Commit a755505

Browse files
committed
feat: ws connection support https redirects before upgrade
Signed-off-by: Eugene Zheng <hsxfjames@gmail.com>
1 parent 8846686 commit a755505

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/agent.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ class XtransitAgent extends EventEmitter {
102102
const server = await this.lookup(this.server);
103103

104104
logger.info(`websocket client connecting to ${server}...`);
105-
const conn = new WebSocket(server);
105+
const conn = new WebSocket(server, {
106+
followRedirects: true,
107+
maxRedirects: 3,
108+
});
106109

107110
conn.on('message', message => {
108111
messageHandler.call(this, message);

0 commit comments

Comments
 (0)