We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1e694a commit d5f2b70Copy full SHA for d5f2b70
helpers/socketHelper.js
@@ -1,9 +1,17 @@
1
import express from 'express';
2
import http from 'http';
3
import io from 'socket.io';
4
+import { subscriptionConfiguration, msalConfiguration } from '../constants';
5
6
const socketServer = http.createServer(express);
-export const ioServer = io(socketServer);
7
+export const ioServer = io(socketServer, {
8
+ cors: {
9
+ origin: [
10
+ msalConfiguration.redirectUri.substring(0, msalConfiguration.redirectUri.lastIndexOf('/')),
11
+ subscriptionConfiguration.notificationUrl.substring(0, subscriptionConfiguration.notificationUrl.lastIndexOf('/'))],
12
+ methods: ['GET', 'POST']
13
+ }
14
+});
15
16
socketServer.listen(3001);
17
0 commit comments