From 0244cdcd425dc042f582b7737baf69a1ef6423e7 Mon Sep 17 00:00:00 2001 From: mayank Date: Thu, 24 Dec 2020 15:22:54 +0530 Subject: [PATCH] chore(socketio): add options for socket client --- src/providers/push/socketio/socketio.provider.ts | 2 +- src/providers/push/socketio/types.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/providers/push/socketio/socketio.provider.ts b/src/providers/push/socketio/socketio.provider.ts index 2453a7d..abb9418 100644 --- a/src/providers/push/socketio/socketio.provider.ts +++ b/src/providers/push/socketio/socketio.provider.ts @@ -12,7 +12,7 @@ export class SocketIOProvider implements Provider { private readonly socketConfig?: SocketConfig, ) { if (this.socketConfig && this.socketConfig.url) { - this.socketService = io(this.socketConfig.url); + this.socketService = io(this.socketConfig.url, socketConfig?.options); } else { throw new HttpErrors.PreconditionFailed('Socket Config missing !'); } diff --git a/src/providers/push/socketio/types.ts b/src/providers/push/socketio/types.ts index f4a2660..7987689 100644 --- a/src/providers/push/socketio/types.ts +++ b/src/providers/push/socketio/types.ts @@ -32,4 +32,10 @@ export interface SocketConfig { * Path represents the default socket server endpoint */ defaultPath: string; + options: { + // sonarignore:start + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [key: string]: any; + // sonarignore:end + }; }