Merge pull request #2438 from khassel/fix_socket_v2

This commit is contained in:
Michael Teeuw 2021-01-27 21:15:01 +01:00 committed by GitHub
commit 3c357f057b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -40,6 +40,7 @@ _This release is scheduled to be released on 2021-04-01._
- Fix empty directory for each module's main javascript file in the inspector - Fix empty directory for each module's main javascript file in the inspector
- Fix Issue with weather forecast icons unit tests with different timezones (#2221) - Fix Issue with weather forecast icons unit tests with different timezones (#2221)
- Fix issue with unencoded characters in translated strings when using nunjuck template (`Loading …` as an example) - Fix issue with unencoded characters in translated strings when using nunjuck template (`Loading …` as an example)
- Fix socket.io backward compatibility with socket v2 clients
## [2.14.0] - 2021-01-01 ## [2.14.0] - 2021-01-01

View File

@ -28,7 +28,11 @@ function Server(config, callback) {
server = require("http").Server(app); server = require("http").Server(app);
} }
const io = require("socket.io")(server, { const io = require("socket.io")(server, {
cors: {} cors: {
origin: /.*$/,
credentials: true
},
allowEIO3: true
}); });
Log.log(`Starting server on port ${port} ... `); Log.log(`Starting server on port ${port} ... `);