feat: copy in axios options headers to WebSocket

This commit is contained in:
Adhiraj Singh
2022-09-20 11:09:34 +05:30
parent ae3ac78dc3
commit f8fd5ec008

View File

@@ -27,10 +27,12 @@ export const makeSocket = ({
defaultQueryTimeoutMs, defaultQueryTimeoutMs,
syncFullHistory, syncFullHistory,
transactionOpts, transactionOpts,
qrTimeout qrTimeout,
options,
}: SocketConfig) => { }: SocketConfig) => {
const ws = new WebSocket(waWebSocketUrl, undefined, { const ws = new WebSocket(waWebSocketUrl, undefined, {
origin: DEFAULT_ORIGIN, origin: DEFAULT_ORIGIN,
headers: options.headers,
handshakeTimeout: connectTimeoutMs, handshakeTimeout: connectTimeoutMs,
timeout: connectTimeoutMs, timeout: connectTimeoutMs,
agent agent