yakuza0 2.22.8 → 2.22.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yakuza0",
3
- "version": "2.22.8",
3
+ "version": "2.22.9",
4
4
  "description": "yakuza0 with nuxt",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -174,7 +174,7 @@ exports.default = function () {
174
174
  var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(_ref2) {
175
175
  var app = _ref2.app,
176
176
  config = _ref2.config;
177
- var cspConnectSrcVerify, appCp, appCpApiV1, jwtVerC, omConf, clnInitCache, cm;
177
+ var cspConnectSrcVerify, appCp, appCpApiV1, jwtVerC, omConf, helmetOptions, clnInitCache, cm;
178
178
  return _regenerator2.default.wrap(function _callee13$(_context13) {
179
179
  while (1) {
180
180
  switch (_context13.prev = _context13.next) {
@@ -269,10 +269,18 @@ exports.default = function () {
269
269
  // const browsers = Object.keys(yConf.allowBrowsers);
270
270
 
271
271
  if (_config2.default.security.helmet) {
272
- app.use((0, _koaHelmet2.default)({
273
- referrerPolicy: { policy: "no-referrer-when-downgrade" }
272
+ helmetOptions = {
273
+ // referrerPolicy: { policy: "no-referrer-when-downgrade" },
274
+ // referrerPolicy: { policy: "strict-origin-when-cross-origin" },
275
+ // referrerPolicy: yConf.stupid.referrerPolicy.policy,
274
276
  // referrerPolicy: { policy: "origin-when-crossorigin" },
275
- }));
277
+ };
278
+
279
+ if (_config2.default.security.isStupid) {
280
+ helmetOptions.referrerPolicy = _config2.default.server.stupid.referrerPolicy;
281
+ }
282
+
283
+ app.use((0, _koaHelmet2.default)(helmetOptions));
276
284
  }
277
285
 
278
286
  // if (!yConf.security.helmet || yConf.server.ddos.enabled) {
@@ -501,6 +501,9 @@ var render = function () {
501
501
  // secretKey: '', // check this from acm console
502
502
  requestTimeout: 6000 // timeout(ms),default 6s
503
503
  }
504
+ },
505
+ stupid: {
506
+ referrerPolicy: { policy: "strict-origin-when-cross-origin" }
504
507
  }
505
508
  },
506
509
  extend: {