yakuza0 2.22.30-beta.1 → 2.22.30-beta.3
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 +1 -1
- package/server/proxy/csrf.js +14 -8
package/package.json
CHANGED
package/server/proxy/csrf.js
CHANGED
|
@@ -275,15 +275,27 @@ exports.default = function () {
|
|
|
275
275
|
// referrerPolicy: yConf.stupid.referrerPolicy.policy,
|
|
276
276
|
// referrerPolicy: { policy: "origin-when-crossorigin" },
|
|
277
277
|
// referrerPolicy: yConf.server.stupid.referrerPolicy,
|
|
278
|
-
crossOriginResourcePolicy:
|
|
278
|
+
// crossOriginResourcePolicy: yConf.server.hm.crossOriginEmbedderPolicy,
|
|
279
279
|
// crossOriginEmbedderPolicy: true,
|
|
280
280
|
// crossOriginResourcePolicy: { policy: "cross-origin" },
|
|
281
281
|
// crossOriginResourcePolicy: { policy: "same-origin" }
|
|
282
|
+
// contentSecurityPolicy: yConf.server.csp.decoration,
|
|
282
283
|
};
|
|
283
284
|
|
|
284
285
|
|
|
286
|
+
if (_config2.default.server.csp.decoration === true) {
|
|
287
|
+
helmetOptions.contentSecurityPolicy = {
|
|
288
|
+
directives: _config2.default.server.csp.directives
|
|
289
|
+
};
|
|
290
|
+
} else {
|
|
291
|
+
helmetOptions.contentSecurityPolicy = false;
|
|
292
|
+
}
|
|
293
|
+
|
|
285
294
|
if (!_config2.default.server.hm.crossOriginEmbedderPolicy) {
|
|
286
|
-
helmetOptions.crossOriginEmbedderPolicy = { policy: "credentialless" };
|
|
295
|
+
// helmetOptions.crossOriginEmbedderPolicy = { policy: "credentialless" };
|
|
296
|
+
helmetOptions.crossOriginEmbedderPolicy = false;
|
|
297
|
+
helmetOptions.crossOriginResourcePolicy = false;
|
|
298
|
+
helmetOptions.crossOriginOpenerPolicy = false;
|
|
287
299
|
// helmetOptions.crossOriginResourcePolicy = { policy: "cross-origin" };
|
|
288
300
|
}
|
|
289
301
|
|
|
@@ -441,12 +453,6 @@ exports.default = function () {
|
|
|
441
453
|
return _ref5.apply(this, arguments);
|
|
442
454
|
};
|
|
443
455
|
}());
|
|
444
|
-
} else {
|
|
445
|
-
if (_config2.default.server.csp.decoration === true) {
|
|
446
|
-
app.use(_koaHelmet2.default.contentSecurityPolicy({
|
|
447
|
-
directives: _config2.default.server.csp.directives
|
|
448
|
-
}));
|
|
449
|
-
}
|
|
450
456
|
}
|
|
451
457
|
}
|
|
452
458
|
|