cloudcms-server 3.2.343 → 3.2.344
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/index.js +6 -6
- package/package.json +2 -2
- package/server/index.js +19 -8
- package/util/proxy-factory.js +3 -3
package/index.js
CHANGED
|
@@ -94,18 +94,18 @@ var HttpsKeepAliveAgent = require('agentkeepalive').HttpsAgent;
|
|
|
94
94
|
http.globalAgent = new HttpKeepAliveAgent({
|
|
95
95
|
keepAlive: true,
|
|
96
96
|
keepAliveMsecs: process.defaultKeepAliveMs,
|
|
97
|
-
maxSockets:
|
|
98
|
-
maxFreeSockets:
|
|
97
|
+
maxSockets: 2048,
|
|
98
|
+
maxFreeSockets: 64,
|
|
99
99
|
timeout: process.defaultHttpTimeoutMs,
|
|
100
|
-
freeSocketTimeout:
|
|
100
|
+
freeSocketTimeout: 30000
|
|
101
101
|
});
|
|
102
102
|
https.globalAgent = new HttpsKeepAliveAgent({
|
|
103
103
|
keepAlive: true,
|
|
104
104
|
keepAliveMsecs: process.defaultKeepAliveMs,
|
|
105
|
-
maxSockets:
|
|
106
|
-
maxFreeSockets:
|
|
105
|
+
maxSockets: 2048,
|
|
106
|
+
maxFreeSockets: 64,
|
|
107
107
|
timeout: process.defaultHttpTimeoutMs,
|
|
108
|
-
freeSocketTimeout:
|
|
108
|
+
freeSocketTimeout: 30000
|
|
109
109
|
});
|
|
110
110
|
|
|
111
111
|
// install dns cache
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"name": "cloudcms-server",
|
|
8
8
|
"description": "Cloud CMS Application Server Module",
|
|
9
|
-
"version": "3.2.
|
|
9
|
+
"version": "3.2.344",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git://github.com/gitana/cloudcms-server.git"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@socket.io/redis-adapter": "^8.3.0",
|
|
17
17
|
"@socket.io/sticky": "^1.0.4",
|
|
18
18
|
"accepts": "^1.3.8",
|
|
19
|
-
"agentkeepalive": "^4.
|
|
19
|
+
"agentkeepalive": "^4.6.0",
|
|
20
20
|
"alpaca": "^1.5.27",
|
|
21
21
|
"archiver": "^7.0.1",
|
|
22
22
|
"async": "^3.2.6",
|
package/server/index.js
CHANGED
|
@@ -1188,7 +1188,17 @@ var createHttpServer = function(app, done)
|
|
|
1188
1188
|
{
|
|
1189
1189
|
// create the server (either HTTP or HTTPS)
|
|
1190
1190
|
var httpServer = null;
|
|
1191
|
-
|
|
1191
|
+
|
|
1192
|
+
var serverConfig = {};
|
|
1193
|
+
if (process.configuration.https)
|
|
1194
|
+
{
|
|
1195
|
+
for (var k in process.configuration.https) {
|
|
1196
|
+
serverConfig[k] = process.configuration.https[k];
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
serverConfig.keepAliveTimeout = process.defaultKeepAliveMs;
|
|
1200
|
+
serverConfig.requestTimeout = process.defaultKeepAliveMs;
|
|
1201
|
+
|
|
1192
1202
|
if (process.configuration.https)
|
|
1193
1203
|
{
|
|
1194
1204
|
if (app)
|
|
@@ -1196,23 +1206,24 @@ var createHttpServer = function(app, done)
|
|
|
1196
1206
|
// configure helmet to support auto-upgrade of http->https
|
|
1197
1207
|
app.use(helmet());
|
|
1198
1208
|
}
|
|
1199
|
-
|
|
1209
|
+
|
|
1200
1210
|
// create https server
|
|
1201
|
-
httpServer = https.createServer(
|
|
1211
|
+
httpServer = https.createServer(serverConfig, app);
|
|
1202
1212
|
}
|
|
1203
1213
|
else
|
|
1204
1214
|
{
|
|
1205
1215
|
// legacy
|
|
1206
|
-
httpServer = http.Server(app);
|
|
1216
|
+
//httpServer = http.Server(app);
|
|
1217
|
+
httpServer = http.createServer(serverConfig, app);
|
|
1207
1218
|
}
|
|
1208
1219
|
|
|
1209
1220
|
// request timeout
|
|
1210
|
-
var
|
|
1221
|
+
var requestTimeoutMs = process.defaultHttpTimeoutMs;
|
|
1211
1222
|
if (process.configuration && process.configuration.timeout)
|
|
1212
1223
|
{
|
|
1213
|
-
|
|
1224
|
+
requestTimeoutMs = process.configuration.timeout;
|
|
1214
1225
|
}
|
|
1215
|
-
httpServer.setTimeout(
|
|
1226
|
+
httpServer.setTimeout(requestTimeoutMs, function(socket) {
|
|
1216
1227
|
try { socket.end(); } catch (e) { }
|
|
1217
1228
|
try { socket.destroy(); } catch (e) { }
|
|
1218
1229
|
});
|
|
@@ -1226,7 +1237,7 @@ var createHttpServer = function(app, done)
|
|
|
1226
1237
|
|
|
1227
1238
|
socket.setNoDelay(true);
|
|
1228
1239
|
|
|
1229
|
-
socket.setTimeout(
|
|
1240
|
+
socket.setTimeout(requestTimeoutMs, function(socket) {
|
|
1230
1241
|
try { socket.end(); } catch (e) { }
|
|
1231
1242
|
try { socket.destroy(); } catch (e) { }
|
|
1232
1243
|
});
|
package/util/proxy-factory.js
CHANGED
|
@@ -47,10 +47,10 @@ var createProxyHandler = function(proxyTarget, pathPrefix)
|
|
|
47
47
|
cacheURLs: 0,
|
|
48
48
|
keepAlive: true,
|
|
49
49
|
keepAliveMsecs: process.defaultKeepAliveMs,
|
|
50
|
-
maxSockets:
|
|
51
|
-
maxFreeSockets:
|
|
50
|
+
maxSockets: 2048,
|
|
51
|
+
maxFreeSockets: 64,
|
|
52
52
|
timeout: process.defaultHttpTimeoutMs,
|
|
53
|
-
freeSocketTimeout:
|
|
53
|
+
freeSocketTimeout: 30000
|
|
54
54
|
|
|
55
55
|
//http2: true,
|
|
56
56
|
//undici: true
|