mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
M #~: fix cors sockets (#1267)
Co-authored-by: Jorge Lobo <jlobo@opennebula.systems>
This commit is contained in:
parent
fd0ebeffd3
commit
1561fcbfcd
@ -31,7 +31,17 @@ const websockets = (appServer = {}) => {
|
||||
appServer.constructor.name &&
|
||||
appServer.constructor.name === 'Server'
|
||||
) {
|
||||
const io = socketIO({ path: defaultEndpointWebsocket }).listen(appServer)
|
||||
const io = socketIO(
|
||||
{
|
||||
path: defaultEndpointWebsocket,
|
||||
cors: {
|
||||
origin: '*',
|
||||
methods: ['GET', 'POST'],
|
||||
credentials: true
|
||||
}
|
||||
}
|
||||
).listen(appServer)
|
||||
|
||||
defaultFilesWebsockets.forEach(file => {
|
||||
try {
|
||||
// eslint-disable-next-line global-require
|
||||
|
@ -102,7 +102,7 @@ require.config({
|
||||
"sprintf": "../bower_components/sprintf/dist/sprintf.min",
|
||||
|
||||
/* socket.io-client */
|
||||
"socket-io-client": "../bower_components/socket.io-client/dist/socket.io.slim",
|
||||
"socket-io-client": "../bower_components/socket.io-client/dist/socket.io.min",
|
||||
|
||||
/* ace editor */
|
||||
"ace-builds": "../bower_components/ace-builds/ace"
|
||||
|
@ -22,7 +22,7 @@
|
||||
"guacamole-common-js": "https://github.com/OpenNebula/sunstone-deps.git#fe6e35b885",
|
||||
"webauthn-json": "https://registry.npmjs.org/@github/webauthn-json/-/webauthn-json-0.4.1.tgz",
|
||||
"wmks": "https://github.com/OpenNebula/sunstone-deps.git#cb0251c",
|
||||
"socket.io-client": "~2.3.0",
|
||||
"socket.io-client": "4.1.2",
|
||||
"ace-builds": "https://github.com/OpenNebula/sunstone-deps.git#01ae12a"
|
||||
},
|
||||
"authors": [
|
||||
|
Loading…
x
Reference in New Issue
Block a user