yakuza0 2.22.29 → 2.22.30-beta.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.
@@ -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.0",
4
4
  "description": "yakuza0 with nuxt",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -274,12 +274,18 @@ 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: _config2.default.server.stupid.referrerPolicy,
278
+ // crossOriginResourcePolicy: yConf.server.stupid.referrerPolicy,
279
+ crossOriginResourcePolicy: { policy: "cross-origin" }
280
+ // crossOriginResourcePolicy: { policy: "same-origin" }
282
281
  };
282
+
283
+
284
+ if (_config2.default.security.isStupid) {
285
+ // helmetOptions.referrerPolicy = yConf.server.stupid.referrerPolicy;
286
+ helmetOptions.crossOriginResourcePolicy = _config2.default.server.stupid.crossOriginResourcePolicy;
287
+ }
288
+
283
289
  app.use((0, _koaHelmet2.default)(helmetOptions));
284
290
  }
285
291
 
@@ -509,7 +509,8 @@ var render = function () {
509
509
  }
510
510
  },
511
511
  stupid: {
512
- referrerPolicy: { policy: "strict-origin-when-cross-origin" }
512
+ referrerPolicy: { policy: "strict-origin-when-cross-origin" },
513
+ crossOriginResourcePolicy: { policy: "same-origin" }
513
514
  }
514
515
  },
515
516
  extend: {