yakuza0 2.22.25 → 2.22.26-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.
@@ -21,6 +21,7 @@ exports.default = function (config) {
21
21
  }
22
22
 
23
23
  if (_config2.default.security.isStupid) {
24
+ directives['script-src'] = _yakuza._.difference(directives['script-src'], ["'self'"]);
24
25
  if (!(directives['object-src'] && _yakuza._.isArray(directives['object-src']) && directives['object-src'].length > 0)) {
25
26
  directives['object-src'] = ["'none'"];
26
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yakuza0",
3
- "version": "2.22.25",
3
+ "version": "2.22.26-beta.0",
4
4
  "description": "yakuza0 with nuxt",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -819,7 +819,7 @@ exports.default = function () {
819
819
  };
820
820
  }());
821
821
  } else {
822
- if (_config2.default.server.csp.custom === true) {
822
+ if (_config2.default.server.csp.decoration === true) {
823
823
  app.use(_koaHelmet2.default.contentSecurityPolicy({
824
824
  directives: _config2.default.server.csp.directives
825
825
  }));
@@ -331,6 +331,7 @@ var render = function () {
331
331
  enabled: true,
332
332
  strict: false,
333
333
  custom: false,
334
+ decoration: false,
334
335
  policies: {},
335
336
  directives: {}
336
337
  },
@@ -775,7 +776,7 @@ var render = function () {
775
776
 
776
777
  case 28:
777
778
  _context2.t1 = conf.dkyMode;
778
- _context2.next = _context2.t1 === "dev" ? 31 : _context2.t1 === "normal" ? 34 : _context2.t1 === "prod" ? 37 : _context2.t1 === "stupid" ? 43 : _context2.t1 === "tire" ? 50 : 55;
779
+ _context2.next = _context2.t1 === "dev" ? 31 : _context2.t1 === "normal" ? 34 : _context2.t1 === "prod" ? 37 : _context2.t1 === "stupid" ? 43 : _context2.t1 === "tire" ? 52 : 57;
779
780
  break;
780
781
 
781
782
  case 31:
@@ -785,7 +786,7 @@ var render = function () {
785
786
  // conf.server.f5Offline = false;
786
787
  conf.security.isDev = true;
787
788
  conf.dev = true;
788
- return _context2.abrupt('break', 55);
789
+ return _context2.abrupt('break', 57);
789
790
 
790
791
  case 34:
791
792
  // conf.security.encrypt = "none";
@@ -794,7 +795,7 @@ var render = function () {
794
795
  // conf.server.f5Offline = false;
795
796
  conf.security.isNormal = true;
796
797
  conf.dev = false;
797
- return _context2.abrupt('break', 55);
798
+ return _context2.abrupt('break', 57);
798
799
 
799
800
  case 37:
800
801
  conf.security.encrypt = "sm";
@@ -803,7 +804,7 @@ var render = function () {
803
804
  // conf.server.f5Offline = false;
804
805
  conf.security.isProd = true;
805
806
  conf.dev = false;
806
- return _context2.abrupt('break', 55);
807
+ return _context2.abrupt('break', 57);
807
808
 
808
809
  case 43:
809
810
  conf.security.encrypt = "sm";
@@ -812,20 +813,22 @@ var render = function () {
812
813
  // conf.server.f5Offline = false;
813
814
  conf.security.isStupid = true;
814
815
  conf.server.csp.enabled = true;
816
+ conf.server.csp.strict = true;
817
+ conf.server.csp.decoration = true;
815
818
  conf.server.sri.enabled = true;
816
819
  // conf.dev = false;
817
- return _context2.abrupt('break', 55);
820
+ return _context2.abrupt('break', 57);
818
821
 
819
- case 50:
822
+ case 52:
820
823
  conf.security.encrypt = "none";
821
824
  conf.security.stupid = false;
822
825
  conf.security.helmet = false;
823
826
  // conf.server.f5Offline = false;
824
827
  conf.security.isTire = true;
825
828
  // conf.dev = false;
826
- return _context2.abrupt('break', 55);
829
+ return _context2.abrupt('break', 57);
827
830
 
828
- case 55:
831
+ case 57:
829
832
 
830
833
  // conf.router.config['app.examples'].enabled = true;
831
834
  if (conf.server.yk4Addr) {
@@ -925,7 +928,7 @@ var render = function () {
925
928
  conf.server.csp.directives = directives;
926
929
 
927
930
  // const appPortUsed = [];
928
- _context2.next = 76;
931
+ _context2.next = 78;
929
932
  return _yakuza._.asyncMap(conf.router.config, function () {
930
933
  var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(v, key) {
931
934
  var name, arr, length, num;
@@ -1110,7 +1113,7 @@ var render = function () {
1110
1113
  };
1111
1114
  }());
1112
1115
 
1113
- case 76:
1116
+ case 78:
1114
1117
  // console.log(conf.router.config);
1115
1118
 
1116
1119
  conf.shareRule.app = conf.shareRule.app.map(function (ap) {
@@ -1232,7 +1235,7 @@ var render = function () {
1232
1235
 
1233
1236
  return _context2.abrupt('return', { conf: conf });
1234
1237
 
1235
- case 87:
1238
+ case 89:
1236
1239
  case 'end':
1237
1240
  return _context2.stop();
1238
1241
  }