@soundworks/core 3.1.0-beta.6 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +14 -14
- package/server/Server.js +11 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soundworks/core",
|
|
3
|
-
"version": "3.1.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "full-stack javascript framework for distributed audio visual experiences on the web",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Benjamin Matuszewski",
|
|
@@ -33,34 +33,34 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"chalk": "^4.1.2",
|
|
36
|
-
"columnify": "^1.
|
|
36
|
+
"columnify": "^1.6.0",
|
|
37
37
|
"compression": "^1.7.1",
|
|
38
|
-
"debug": "^4.
|
|
38
|
+
"debug": "^4.3.4",
|
|
39
39
|
"fast-deep-equal": "^3.1.3",
|
|
40
40
|
"fast-text-encoding": "^1.0.0",
|
|
41
41
|
"isomorphic-ws": "^4.0.1",
|
|
42
|
-
"keyv": "^4.
|
|
42
|
+
"keyv": "^4.2.2",
|
|
43
43
|
"keyv-file": "^0.2.0",
|
|
44
44
|
"lodash.clonedeep": "^4.5.0",
|
|
45
45
|
"lodash.merge": "^4.6.2",
|
|
46
|
-
"pem": "^1.
|
|
46
|
+
"pem": "^1.14.6",
|
|
47
47
|
"polka": "^0.5.2",
|
|
48
|
-
"serve-static": "^1.
|
|
48
|
+
"serve-static": "^1.15.0",
|
|
49
49
|
"uuid": "^8.3.2",
|
|
50
50
|
"window-or-global": "^1.0.1",
|
|
51
|
-
"ws": "^8.
|
|
51
|
+
"ws": "^8.5.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@babel/cli": "^7.
|
|
55
|
-
"@babel/core": "^7.
|
|
56
|
-
"@babel/preset-env": "^7.
|
|
57
|
-
"chai": "^4.
|
|
58
|
-
"chokidar": "^3.
|
|
54
|
+
"@babel/cli": "^7.17.6",
|
|
55
|
+
"@babel/core": "^7.17.9",
|
|
56
|
+
"@babel/preset-env": "^7.16.11",
|
|
57
|
+
"chai": "^4.3.6",
|
|
58
|
+
"chokidar": "^3.5.3",
|
|
59
59
|
"chokidar-cli": "^3.0.0",
|
|
60
60
|
"docdash": "^1.2.0",
|
|
61
|
-
"jsdoc": "^3.6.
|
|
61
|
+
"jsdoc": "^3.6.10",
|
|
62
62
|
"markdown-toc": "^1.2.0",
|
|
63
|
-
"mocha": "^9.
|
|
63
|
+
"mocha": "^9.2.2"
|
|
64
64
|
},
|
|
65
65
|
"optionalDependencies": {
|
|
66
66
|
"bufferutil": "^4.0.5",
|
package/server/Server.js
CHANGED
|
@@ -237,7 +237,8 @@ class Server {
|
|
|
237
237
|
path: 'socket',
|
|
238
238
|
pingInterval: 5000
|
|
239
239
|
},
|
|
240
|
-
useHttps: false
|
|
240
|
+
useHttps: false,
|
|
241
|
+
crossOriginIsolated: true
|
|
241
242
|
},
|
|
242
243
|
app: {
|
|
243
244
|
name: 'soundworks'
|
|
@@ -544,14 +545,18 @@ class Server {
|
|
|
544
545
|
data.env.subpath = this.config.env.subpath;
|
|
545
546
|
} // cors / coop / coep headers for `crossOriginIsolated pages, enables
|
|
546
547
|
// sharedArrayBuffers and high precision timers
|
|
548
|
+
// this is the default behavior
|
|
547
549
|
// cf. https://web.dev/why-coop-coep/
|
|
548
550
|
|
|
549
551
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
552
|
+
if (this.config.env.crossOriginIsolated) {
|
|
553
|
+
res.writeHead(200, {
|
|
554
|
+
'Cross-Origin-Resource-Policy': 'same-origin',
|
|
555
|
+
'Cross-Origin-Embedder-Policy': 'require-corp',
|
|
556
|
+
'Cross-Origin-Opener-Policy': 'same-origin'
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
|
|
555
560
|
const appIndex = tmpl(data);
|
|
556
561
|
res.end(appIndex);
|
|
557
562
|
}); // return route infos for logging on server start
|