Skip to content

Commit 0244cdc

Browse files
chore(socketio): add options for socket client
1 parent 950f619 commit 0244cdc

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/providers/push/socketio/socketio.provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class SocketIOProvider implements Provider<SocketNotification> {
1212
private readonly socketConfig?: SocketConfig,
1313
) {
1414
if (this.socketConfig && this.socketConfig.url) {
15-
this.socketService = io(this.socketConfig.url);
15+
this.socketService = io(this.socketConfig.url, socketConfig?.options);
1616
} else {
1717
throw new HttpErrors.PreconditionFailed('Socket Config missing !');
1818
}

src/providers/push/socketio/types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,10 @@ export interface SocketConfig {
3232
* Path represents the default socket server endpoint
3333
*/
3434
defaultPath: string;
35+
options: {
36+
// sonarignore:start
37+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
38+
[key: string]: any;
39+
// sonarignore:end
40+
};
3541
}

0 commit comments

Comments
 (0)