cloudcms-server 3.2.283 → 3.2.284
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 +42 -0
- package/package.json +4 -4
- package/util/proxy-factory.js +1 -0
package/index.js
CHANGED
|
@@ -48,6 +48,48 @@ if (process.env.DEFAULT_HTTP_TIMEOUT_MS)
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
// default agents
|
|
52
|
+
var HttpKeepAliveAgent = require('agentkeepalive');
|
|
53
|
+
var HttpsKeepAliveAgent = require('agentkeepalive').HttpsAgent;
|
|
54
|
+
http.globalAgent = new HttpKeepAliveAgent({
|
|
55
|
+
keepAlive: true,
|
|
56
|
+
keepAliveMsecs: 5000,
|
|
57
|
+
maxSockets: 16000,
|
|
58
|
+
maxFreeSockets: 256,
|
|
59
|
+
timeout: process.defaultHttpTimeoutMs,
|
|
60
|
+
freeSocketTimeout: 4000
|
|
61
|
+
});
|
|
62
|
+
https.globalAgent = new HttpsKeepAliveAgent({
|
|
63
|
+
keepAlive: true,
|
|
64
|
+
keepAliveMsecs: 1000,
|
|
65
|
+
maxSockets: 16000,
|
|
66
|
+
maxFreeSockets: 256,
|
|
67
|
+
timeout: process.defaultHttpTimeoutMs,
|
|
68
|
+
freeSocketTimeout: 4000
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// disable for now
|
|
72
|
+
/*
|
|
73
|
+
// report http/https socket state every minute
|
|
74
|
+
var socketReportFn = function()
|
|
75
|
+
{
|
|
76
|
+
setTimeout(function() {
|
|
77
|
+
|
|
78
|
+
var http = require("http");
|
|
79
|
+
var https = require("https");
|
|
80
|
+
|
|
81
|
+
process.log("--- START SOCKET REPORT ---");
|
|
82
|
+
process.log("[http]: " + JSON.stringify(http.globalAgent.getCurrentStatus(), null, " "));
|
|
83
|
+
process.log("[https]:" + JSON.stringify(https.globalAgent.getCurrentStatus(), null, " "));
|
|
84
|
+
process.log("--- END SOCKET REPORT ---");
|
|
85
|
+
|
|
86
|
+
socketReportFn();
|
|
87
|
+
|
|
88
|
+
}, 60 * 1000);
|
|
89
|
+
};
|
|
90
|
+
socketReportFn();
|
|
91
|
+
*/
|
|
92
|
+
|
|
51
93
|
// root ssl ca's
|
|
52
94
|
require("ssl-root-cas").inject();
|
|
53
95
|
|
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.284",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git://github.com/gitana/cloudcms-server.git"
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
"@socket.io/redis-adapter": "^7.2.0",
|
|
17
17
|
"@socket.io/sticky": "^1.0.1",
|
|
18
18
|
"accepts": "^1.3.8",
|
|
19
|
+
"agentkeepalive": "^4.2.1",
|
|
19
20
|
"alpaca": "^1.5.27",
|
|
20
21
|
"archiver": "^1.3.0",
|
|
21
22
|
"async": "^3.2.3",
|
|
22
23
|
"async-lock": "^1.3.2",
|
|
23
|
-
"aws-sdk": "^2.
|
|
24
|
-
"basic-auth": "^
|
|
24
|
+
"aws-sdk": "^2.1208.0",
|
|
25
|
+
"basic-auth": "^2.0.1",
|
|
25
26
|
"body-parser": "^1.20.0",
|
|
26
27
|
"bytes": "^2.5.0",
|
|
27
28
|
"canoe": "^0.3.3",
|
|
@@ -70,7 +71,6 @@
|
|
|
70
71
|
"passport-saml": "^2.2.0",
|
|
71
72
|
"passport-twitter": "^0.1.5",
|
|
72
73
|
"pkginfo": "^0.4.1",
|
|
73
|
-
"q": "^1.5.1",
|
|
74
74
|
"random-js": "^1.0.8",
|
|
75
75
|
"recursive-readdir": "^2.2.2",
|
|
76
76
|
"redis": "^4.2.0",
|
package/util/proxy-factory.js
CHANGED
|
@@ -106,6 +106,7 @@ var createProxyHandler = function(proxyTarget, pathPrefix)
|
|
|
106
106
|
webConfig.port = port;
|
|
107
107
|
webConfig.protocol = protocol;
|
|
108
108
|
//webConfig.path = null;
|
|
109
|
+
webConfig.timeout = 120000;
|
|
109
110
|
webConfig.proxyTimeout = 120000;
|
|
110
111
|
webConfig.proxyName = "Cloud CMS UI Proxy";
|
|
111
112
|
webConfig.onReq = function(req, options) {
|