yakuza0 2.22.29 → 2.22.30-beta.1

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.
@@ -20,8 +20,8 @@ exports.default = function (config) {
20
20
  cspSwitch = false;
21
21
  }
22
22
 
23
+ directives['script-src'] = _yakuza._.difference(directives['script-src'], ["'self'", '"self"']);
23
24
  if (_config2.default.security.isStupid) {
24
- directives['script-src'] = _yakuza._.difference(directives['script-src'], ["'self'"]);
25
25
  if (!(directives['object-src'] && _yakuza._.isArray(directives['object-src']) && directives['object-src'].length > 0)) {
26
26
  directives['object-src'] = ["'none'"];
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yakuza0",
3
- "version": "2.22.29",
3
+ "version": "2.22.30-beta.1",
4
4
  "description": "yakuza0 with nuxt",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -274,12 +274,24 @@ exports.default = function () {
274
274
  // referrerPolicy: { policy: "strict-origin-when-cross-origin" },
275
275
  // referrerPolicy: yConf.stupid.referrerPolicy.policy,
276
276
  // referrerPolicy: { policy: "origin-when-crossorigin" },
277
- referrerPolicy: _config2.default.server.stupid.referrerPolicy
278
- // if (yConf.security.isStupid && yConf.security.isDev) {
279
- // helmetOptions.referrerPolicy = yConf.server.stupid.referrerPolicy;
280
- // }
281
-
277
+ // referrerPolicy: yConf.server.stupid.referrerPolicy,
278
+ crossOriginResourcePolicy: _config2.default.server.hm.crossOriginEmbedderPolicy
279
+ // crossOriginEmbedderPolicy: true,
280
+ // crossOriginResourcePolicy: { policy: "cross-origin" },
281
+ // crossOriginResourcePolicy: { policy: "same-origin" }
282
282
  };
283
+
284
+
285
+ if (!_config2.default.server.hm.crossOriginEmbedderPolicy) {
286
+ helmetOptions.crossOriginEmbedderPolicy = { policy: "credentialless" };
287
+ // helmetOptions.crossOriginResourcePolicy = { policy: "cross-origin" };
288
+ }
289
+
290
+ if (_config2.default.security.isStupid) {
291
+ // helmetOptions.referrerPolicy = yConf.server.stupid.referrerPolicy;
292
+ // helmetOptions.crossOriginResourcePolicy = yConf.server.stupid.crossOriginResourcePolicy;
293
+ }
294
+
283
295
  app.use((0, _koaHelmet2.default)(helmetOptions));
284
296
  }
285
297
 
@@ -313,6 +313,9 @@ var render = function () {
313
313
  cookieSameSite: 'Lax',
314
314
  // ...mainConf.server,
315
315
  // ...ykConf.server,
316
+ hm: {
317
+ crossOriginEmbedderPolicy: true
318
+ },
316
319
  log: {
317
320
  enabled: true,
318
321
  onlySSR: true,
@@ -509,7 +512,8 @@ var render = function () {
509
512
  }
510
513
  },
511
514
  stupid: {
512
- referrerPolicy: { policy: "strict-origin-when-cross-origin" }
515
+ referrerPolicy: { policy: "strict-origin-when-cross-origin" },
516
+ crossOriginResourcePolicy: { policy: "same-origin" }
513
517
  }
514
518
  },
515
519
  extend: {