yakuza0 2.22.30-beta.2 → 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 +9 -6
package/package.json
CHANGED
package/server/proxy/csrf.js
CHANGED
|
@@ -279,9 +279,18 @@ exports.default = function () {
|
|
|
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
295
|
// helmetOptions.crossOriginEmbedderPolicy = { policy: "credentialless" };
|
|
287
296
|
helmetOptions.crossOriginEmbedderPolicy = false;
|
|
@@ -444,12 +453,6 @@ exports.default = function () {
|
|
|
444
453
|
return _ref5.apply(this, arguments);
|
|
445
454
|
};
|
|
446
455
|
}());
|
|
447
|
-
} else {
|
|
448
|
-
if (_config2.default.server.csp.decoration === true) {
|
|
449
|
-
app.use(_koaHelmet2.default.contentSecurityPolicy({
|
|
450
|
-
directives: _config2.default.server.csp.directives
|
|
451
|
-
}));
|
|
452
|
-
}
|
|
453
456
|
}
|
|
454
457
|
}
|
|
455
458
|
|