yakuza0 2.23.19 → 2.23.20-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/tire.js +4 -0
- package/utils/inclusive.js +2 -1
package/package.json
CHANGED
package/server/proxy/tire.js
CHANGED
|
@@ -363,6 +363,7 @@ exports.default = function () {
|
|
|
363
363
|
// res.send(data.body);
|
|
364
364
|
} else {
|
|
365
365
|
// console.log(req.url, "sec nooo~");
|
|
366
|
+
var userAgentMd5 = (0, _server.md5)(req.get('User-Agent'));
|
|
366
367
|
var extIndex = req.url.lastIndexOf('.');
|
|
367
368
|
if (!apiVer(req.url) && extIndex === -1) {
|
|
368
369
|
var _extends2;
|
|
@@ -373,6 +374,7 @@ exports.default = function () {
|
|
|
373
374
|
url: req.url,
|
|
374
375
|
project: _config2.default.name,
|
|
375
376
|
app: config.appName,
|
|
377
|
+
userAgentMd5: userAgentMd5,
|
|
376
378
|
|
|
377
379
|
personality: server.generate.personality,
|
|
378
380
|
domain: appConf.cookieDomain || _server.Cookies.getDefCookieDomain(req && req.headers && req.headers.host || ''),
|
|
@@ -520,6 +522,7 @@ exports.default = function () {
|
|
|
520
522
|
ws: true,
|
|
521
523
|
// pathRewrite: {['^/' + server.basePath + '/api-ws'] : '/api-ws'},
|
|
522
524
|
onProxyRes: function onProxyRes(proxyRes, req, res) {
|
|
525
|
+
var userAgentMd5 = (0, _server.md5)(req.headers["User-Agent".toLowerCase()]);
|
|
523
526
|
var isDoc = ['text/html; charset=utf-8'].includes((proxyRes.headers['content-type'] || '').toLowerCase());
|
|
524
527
|
|
|
525
528
|
// cache ---
|
|
@@ -601,6 +604,7 @@ exports.default = function () {
|
|
|
601
604
|
project: _config2.default.name,
|
|
602
605
|
app: config.appName,
|
|
603
606
|
url: req.url,
|
|
607
|
+
userAgentMd5: userAgentMd5,
|
|
604
608
|
|
|
605
609
|
personality: server.generate.personality,
|
|
606
610
|
host: pHost,
|
package/utils/inclusive.js
CHANGED
|
@@ -395,7 +395,8 @@ var render = function () {
|
|
|
395
395
|
compress: {
|
|
396
396
|
threshold: 1024,
|
|
397
397
|
gzip: true,
|
|
398
|
-
brotli: false
|
|
398
|
+
brotli: false,
|
|
399
|
+
br: false
|
|
399
400
|
// ...(mainConf.server && mainConf.server.compress ? mainConf.server.compress : {}),
|
|
400
401
|
// ...(ykConf.server && ykConf.server.compress ? ykConf.server.compress : {})
|
|
401
402
|
},
|