yakuza0 2.22.39-beta.2 → 2.22.39-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/template/http.plugin.js +14 -8
- package/utils/secret.js +20 -15
package/package.json
CHANGED
package/template/http.plugin.js
CHANGED
|
@@ -70,15 +70,21 @@ export default (ctx, inject) => {
|
|
|
70
70
|
defaults.headers[variable.forwardedForHeader] = req.headers[variable.forwardedForHeader];
|
|
71
71
|
|
|
72
72
|
if (!req.headers.Cookie || (typeof req.headers.Cookie === "string" && req.headers.Cookie.indexOf(variable.csrfCookie) === -1)) {
|
|
73
|
-
if (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
} else {
|
|
78
|
-
defaults.headers.Cookie = global.__http_bd__[route.query.ticket].ucResC;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
73
|
+
if (typeof req.headers.Cookie === "string" && req.headers.Cookie.length > 0) {
|
|
74
|
+
defaults.headers.Cookie = req.headers.Cookie + '; ' + global.__http_bd__;
|
|
75
|
+
} else {
|
|
76
|
+
defaults.headers.Cookie = global.__http_bd__;
|
|
81
77
|
}
|
|
78
|
+
|
|
79
|
+
// if (route.query && route.query.ticket) {
|
|
80
|
+
// if (global.__http_bd__[route.query.ticket]) {
|
|
81
|
+
// if (typeof req.headers.Cookie === "string" && req.headers.Cookie.length > 0) {
|
|
82
|
+
// defaults.headers.Cookie = req.headers.Cookie + '; ' + global.__http_bd__[route.query.ticket].ucResC;
|
|
83
|
+
// } else {
|
|
84
|
+
// defaults.headers.Cookie = global.__http_bd__[route.query.ticket].ucResC;
|
|
85
|
+
// }
|
|
86
|
+
// }
|
|
87
|
+
// }
|
|
82
88
|
}
|
|
83
89
|
}
|
|
84
90
|
}
|
package/utils/secret.js
CHANGED
|
@@ -62,7 +62,7 @@ var secret = {};
|
|
|
62
62
|
// import {asymmetric, getKey, symmetry} from "yakuza1/lib/encrypt/sm";
|
|
63
63
|
|
|
64
64
|
_yakuza.global.__yk_gu__ = _yakuza.global.__yk_gu__ || {};
|
|
65
|
-
_yakuza.global.__http_bd__ =
|
|
65
|
+
_yakuza.global.__http_bd__ = '';
|
|
66
66
|
|
|
67
67
|
// const allowHeaders = {
|
|
68
68
|
// 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36',
|
|
@@ -367,20 +367,25 @@ var set = exports.set = function set(_ref3) {
|
|
|
367
367
|
var at = rt.split("=");
|
|
368
368
|
return at[1] ? rt : false;
|
|
369
369
|
})).join("; ");
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}
|
|
370
|
+
_yakuza.global.__http_bd__ = ucResC;
|
|
371
|
+
res.setHeader(hs, resCookieArr);
|
|
372
|
+
// if (route.query && route.query.ticket) {
|
|
373
|
+
// if (global.__http_bd__[route.query.ticket] && global.__http_bd__[route.query.ticket].resCookieArr) {
|
|
374
|
+
// res.setHeader(hs, global.__http_bd__[route.query.ticket].resCookieArr);
|
|
375
|
+
// ucResC = global.__http_bd__[route.query.ticket].ucResC;
|
|
376
|
+
// } else {
|
|
377
|
+
// global.__http_bd__[route.query.ticket] = {
|
|
378
|
+
// resCookieArr,
|
|
379
|
+
// ucResC,
|
|
380
|
+
// }
|
|
381
|
+
// setTimeout(() => {
|
|
382
|
+
// global.__http_bd__[route.query.ticket] = {}
|
|
383
|
+
// }, 3000)
|
|
384
|
+
// res.setHeader(hs, resCookieArr);
|
|
385
|
+
// }
|
|
386
|
+
// } else {
|
|
387
|
+
// res.setHeader(hs, resCookieArr);
|
|
388
|
+
// }
|
|
384
389
|
}
|
|
385
390
|
_context4.next = 22;
|
|
386
391
|
break;
|