Merge pull request #2411 from khassel/fix_cors

fix socket.io cors errors
This commit is contained in:
Michael Teeuw
2021-01-10 10:13:16 +01:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ _This release is scheduled to be released on 2021-04-01._
### Fixed
- Added default log levels to stop calendar log spamming.
- Fix socket.io cors errors, see [breaking change since socket.io v3](https://socket.io/docs/v3/handling-cors/)
## [2.14.0] - 2021-01-01

View File

@@ -27,7 +27,9 @@ function Server(config, callback) {
} else {
server = require("http").Server(app);
}
const io = require("socket.io")(server);
const io = require("socket.io")(server, {
cors: {}
});
Log.log(`Starting server on port ${port} ... `);