yakuza0 2.22.4 → 2.22.6-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.
- package/package.json +1 -1
- package/server/proxy/csrf.js +8 -4
- package/utils/inclusive.js +1 -1
package/package.json
CHANGED
package/server/proxy/csrf.js
CHANGED
|
@@ -268,6 +268,10 @@ exports.default = function () {
|
|
|
268
268
|
omConf = _config2.default.server.om;
|
|
269
269
|
// const browsers = Object.keys(yConf.allowBrowsers);
|
|
270
270
|
|
|
271
|
+
if (_config2.default.security.helmet) {
|
|
272
|
+
app.use((0, _koaHelmet2.default)());
|
|
273
|
+
}
|
|
274
|
+
|
|
271
275
|
// if (!yConf.security.helmet || yConf.server.ddos.enabled) {
|
|
272
276
|
// const unit = parseFloat(yConf.server.ddos.unit);
|
|
273
277
|
// const ddosDelay = parseInt(yConf.server.ddos.delay);
|
|
@@ -403,8 +407,8 @@ exports.default = function () {
|
|
|
403
407
|
break;
|
|
404
408
|
}
|
|
405
409
|
|
|
406
|
-
|
|
407
|
-
clnInitCache(ctx)
|
|
410
|
+
(0, _control.noCache)(ctx);
|
|
411
|
+
// clnInitCache(ctx)
|
|
408
412
|
_server.global.__yk_cln_init_client__ = _server.global.__yk_cln_init_client__ || _paths2.default.read(ycp.confClient);
|
|
409
413
|
// const str = paths.read(ycp.confClient);
|
|
410
414
|
ctx.status = 200;
|
|
@@ -775,7 +779,7 @@ exports.default = function () {
|
|
|
775
779
|
}
|
|
776
780
|
|
|
777
781
|
if (_config2.default.security.helmet) {
|
|
778
|
-
app.use((
|
|
782
|
+
// app.use(helmet());
|
|
779
783
|
|
|
780
784
|
if (_config2.default.security.isStupid) {
|
|
781
785
|
if (typeof _config2.default.server.csp.custom === "string") {
|
|
@@ -937,7 +941,7 @@ exports.default = function () {
|
|
|
937
941
|
};
|
|
938
942
|
}());
|
|
939
943
|
|
|
940
|
-
case
|
|
944
|
+
case 21:
|
|
941
945
|
case 'end':
|
|
942
946
|
return _context13.stop();
|
|
943
947
|
}
|
package/utils/inclusive.js
CHANGED
|
@@ -1162,7 +1162,7 @@ var render = function () {
|
|
|
1162
1162
|
if (v.enabled) {
|
|
1163
1163
|
conf.proxyServer = v.proxyServer;
|
|
1164
1164
|
conf.server = v.server;
|
|
1165
|
-
var scKeyStr = (0, _stringify2.default)(conf) + conf.childKey;
|
|
1165
|
+
var scKeyStr = (0, _stringify2.default)(_yakuza._.omit(conf, ["cmd", "versionSha"])) + conf.childKey;
|
|
1166
1166
|
if (conf.inImage) {
|
|
1167
1167
|
scKeyStr = k + conf.imageKeyOrigin;
|
|
1168
1168
|
}
|