@abtnode/router-provider 1.16.47-beta-20250731-014139-e860268f → 1.16.47-beta-20250805-095401-14eb156b
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/lib/default/index.js
CHANGED
|
@@ -427,3 +427,23 @@ SecRule REQUEST_FILENAME "@endsWith /.well-known/service/admin/api/preferences"
|
|
|
427
427
|
chain"
|
|
428
428
|
SecRule REQUEST_METHOD "@pm GET POST PUT" \
|
|
429
429
|
"ctl:ruleEngine=Off"
|
|
430
|
+
|
|
431
|
+
# Disable some rules for /api/v2/chat endpoint for aigne-hub
|
|
432
|
+
SecRule REQUEST_FILENAME "@contains /api/v2/chat" \
|
|
433
|
+
"id:1028,\
|
|
434
|
+
phase:1,\
|
|
435
|
+
pass,\
|
|
436
|
+
nolog,\
|
|
437
|
+
chain"
|
|
438
|
+
SecRule REQUEST_METHOD "@pm POST" \
|
|
439
|
+
"ctl:ruleEngine=Off"
|
|
440
|
+
|
|
441
|
+
# Disable some rules for /discussions/add endpoint for discuss-kit
|
|
442
|
+
SecRule REQUEST_FILENAME "@contains /discussions/add" \
|
|
443
|
+
"id:1029,\
|
|
444
|
+
phase:1,\
|
|
445
|
+
pass,\
|
|
446
|
+
nolog,\
|
|
447
|
+
chain"
|
|
448
|
+
SecRule REQUEST_METHOD "@pm GET POST PUT" \
|
|
449
|
+
"ctl:ruleEngine=Off"
|
package/lib/nginx/index.js
CHANGED
|
@@ -84,6 +84,23 @@ const parseServerName = (domain) => {
|
|
|
84
84
|
return domain;
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
+
const getVersion = (nginxBinPath = '') => {
|
|
88
|
+
let binPath = nginxBinPath;
|
|
89
|
+
if (!binPath) {
|
|
90
|
+
const whichNginx = shelljs.which('nginx');
|
|
91
|
+
binPath = whichNginx ? whichNginx.toString() : '';
|
|
92
|
+
}
|
|
93
|
+
if (!binPath) {
|
|
94
|
+
return '';
|
|
95
|
+
}
|
|
96
|
+
const result = shelljs.exec(`${binPath} -v`, { silent: true });
|
|
97
|
+
let version = '';
|
|
98
|
+
if (result.code === 0) {
|
|
99
|
+
version = semver.coerce((result.stderr || result.stdout).split('/').pop())?.version || '';
|
|
100
|
+
}
|
|
101
|
+
return version;
|
|
102
|
+
};
|
|
103
|
+
|
|
87
104
|
class NginxProvider extends BaseProvider {
|
|
88
105
|
/**
|
|
89
106
|
* @param {object} options
|
|
@@ -459,9 +476,9 @@ class NginxProvider extends BaseProvider {
|
|
|
459
476
|
capabilities.modsecurity = modulePaths.some((x) => toLower(x).includes('modsecurity'));
|
|
460
477
|
}
|
|
461
478
|
|
|
462
|
-
const
|
|
463
|
-
if (
|
|
464
|
-
capabilities.version =
|
|
479
|
+
const version = getVersion(this.binPath);
|
|
480
|
+
if (version) {
|
|
481
|
+
capabilities.version = version;
|
|
465
482
|
}
|
|
466
483
|
|
|
467
484
|
return capabilities;
|
|
@@ -1542,5 +1559,6 @@ NginxProvider.exists = () => !!shelljs.which('nginx');
|
|
|
1542
1559
|
|
|
1543
1560
|
NginxProvider.getUsablePorts = () => getUsablePorts('nginx', hasPortPermission);
|
|
1544
1561
|
NginxProvider.hasPortPermission = hasPortPermission;
|
|
1562
|
+
NginxProvider.version = getVersion();
|
|
1545
1563
|
|
|
1546
1564
|
module.exports = NginxProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/router-provider",
|
|
3
|
-
"version": "1.16.47-beta-
|
|
3
|
+
"version": "1.16.47-beta-20250805-095401-14eb156b",
|
|
4
4
|
"description": "Routing engine implementations for abt node",
|
|
5
5
|
"author": "polunzh <polunzh@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/ArcBlock/blocklet-server#readme",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"url": "https://github.com/ArcBlock/blocklet-server/issues"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@abtnode/constant": "1.16.47-beta-
|
|
36
|
-
"@abtnode/db-cache": "1.16.47-beta-
|
|
37
|
-
"@abtnode/logger": "1.16.47-beta-
|
|
38
|
-
"@abtnode/router-templates": "1.16.47-beta-
|
|
39
|
-
"@abtnode/util": "1.16.47-beta-
|
|
35
|
+
"@abtnode/constant": "1.16.47-beta-20250805-095401-14eb156b",
|
|
36
|
+
"@abtnode/db-cache": "1.16.47-beta-20250805-095401-14eb156b",
|
|
37
|
+
"@abtnode/logger": "1.16.47-beta-20250805-095401-14eb156b",
|
|
38
|
+
"@abtnode/router-templates": "1.16.47-beta-20250805-095401-14eb156b",
|
|
39
|
+
"@abtnode/util": "1.16.47-beta-20250805-095401-14eb156b",
|
|
40
40
|
"@arcblock/http-proxy": "^1.19.1",
|
|
41
41
|
"@arcblock/is-valid-domain": "^1.0.5",
|
|
42
42
|
"@ocap/util": "^1.21.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"bluebird": "^3.7.2",
|
|
63
63
|
"fs-extra": "^11.2.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "db2c143c5986281db1ae735aac70cbeb8c817773"
|
|
66
66
|
}
|