@abtnode/router-provider 1.16.15 → 1.16.16-beta-e038cde7
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/nginx/index.js +4 -2
- package/lib/nginx/util.js +1 -0
- package/package.json +6 -6
package/lib/nginx/index.js
CHANGED
|
@@ -189,7 +189,9 @@ class NginxProvider extends BaseProvider {
|
|
|
189
189
|
const { sites, cacheGroups, configs: siteCorsConfigs } = formatRoutingTable(routingTable);
|
|
190
190
|
|
|
191
191
|
this._addCorsMap(conf, siteCorsConfigs);
|
|
192
|
-
this.
|
|
192
|
+
if (this.cacheEnabled) {
|
|
193
|
+
this._addCacheGroups(conf, cacheGroups);
|
|
194
|
+
}
|
|
193
195
|
conf.nginx.http._add('server_tokens', 'off');
|
|
194
196
|
this._addCommonResHeaders(conf.nginx.http, commonHeaders);
|
|
195
197
|
this._addExposeServices(conf, services);
|
|
@@ -376,7 +378,7 @@ class NginxProvider extends BaseProvider {
|
|
|
376
378
|
const result = shelljs.exec(`${this.binPath} -V`, { silent: true });
|
|
377
379
|
|
|
378
380
|
if (result.code !== 0) {
|
|
379
|
-
logger.error('read nginx configure arguments error',
|
|
381
|
+
logger.error('read nginx configure arguments error', result);
|
|
380
382
|
throw new Error(`read nginx configure arguments error: ${formatError(result.stderr)}`);
|
|
381
383
|
}
|
|
382
384
|
|
package/lib/nginx/util.js
CHANGED
|
@@ -178,6 +178,7 @@ const getMainTemplate = ({
|
|
|
178
178
|
`${nginxLoadModules}
|
|
179
179
|
${getDynamicModulesDirective(capabilities)}
|
|
180
180
|
worker_processes ${workerProcess};
|
|
181
|
+
worker_shutdown_timeout 30s;
|
|
181
182
|
error_log /dev/null crit;
|
|
182
183
|
user ${os.userInfo().username} ${getUserGroup(os.userInfo().username)};
|
|
183
184
|
pid nginx.pid;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/router-provider",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.16-beta-e038cde7",
|
|
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,10 +32,10 @@
|
|
|
32
32
|
"url": "https://github.com/ArcBlock/blocklet-server/issues"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@abtnode/constant": "1.16.
|
|
36
|
-
"@abtnode/logger": "1.16.
|
|
37
|
-
"@abtnode/router-templates": "1.16.
|
|
38
|
-
"@abtnode/util": "1.16.
|
|
35
|
+
"@abtnode/constant": "1.16.16-beta-e038cde7",
|
|
36
|
+
"@abtnode/logger": "1.16.16-beta-e038cde7",
|
|
37
|
+
"@abtnode/router-templates": "1.16.16-beta-e038cde7",
|
|
38
|
+
"@abtnode/util": "1.16.16-beta-e038cde7",
|
|
39
39
|
"@arcblock/http-proxy": "^1.19.1",
|
|
40
40
|
"axios": "^0.27.2",
|
|
41
41
|
"debug": "^4.3.4",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"bluebird": "^3.7.2",
|
|
60
60
|
"fs-extra": "^10.1.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "688b1c7ae0f6652094100c101f5d218266dd86ac"
|
|
63
63
|
}
|