make maxPayload of websocket configurable via JAMBONES_WS_MAX_PAYLOAD

This commit is contained in:
Dave Horton
2022-09-13 12:35:31 +02:00
parent c88163fe11
commit 468a9e6d6b

View File

@@ -187,7 +187,7 @@ class WsRequestor extends BaseRequestor {
followRedirects: true,
maxRedirects: 2,
handshakeTimeout,
maxPayload: 8096,
maxPayload: process.env.JAMBONES_WS_MAX_PAYLOAD ? parseInt(process.env.JAMBONES_WS_MAX_PAYLOAD) : 24 * 1024,
};
if (this.username && this.password) opts = {...opts, auth: `${this.username}:${this.password}`};