Update to OrangeCircle 1.1.0
This commit is contained in:
parent
616aef298e
commit
4867f4e092
2 changed files with 13 additions and 4 deletions
13
index.js
13
index.js
|
@ -11,7 +11,13 @@ try {
|
|||
} catch (ex) {
|
||||
// Can't determine version
|
||||
}
|
||||
var configJSONS = JSON.parse(fs.readFileSync(__dirname + "/../../../config.json")); // Read configuration JSON
|
||||
var configJSONS = {};
|
||||
try {
|
||||
configJSONS = JSON.parse(fs.readFileSync(__dirname + "/../../../config.json")); // Read configuration JSON
|
||||
} catch(ex) {
|
||||
//OrangeCircle will not care about configJSONS in SVR.JS 3.x and newer
|
||||
//SVR.JS 2.x and older will fail to start with broken configuration file anyway...
|
||||
}
|
||||
var scgiConf = {};
|
||||
try {
|
||||
scgiConf = JSON.parse(fs.readFileSync(__dirname + "/../../../orangecircle-config.json"));
|
||||
|
@ -25,6 +31,8 @@ scgiConf.path = scgiConf.path.replace(/([^\/])\/+$/, "$1");
|
|||
if (scgiConf.host === undefined) scgiConf.host = "localhost";
|
||||
if (scgiConf.port === undefined) scgiConf.port = 4000;
|
||||
|
||||
var disableModExposeSupported = process.versions.svrjs && process.versions.svrjs.match(/^(?:Nightly-|(?:[4-9]|[123][0-9])[0-9]*\.|3\.(?:[1-9][0-9]+\.|9\.(?:[1-9])|4\.(?:(?:[3-9]|[12][0-9])[0-9]+|29)))/i);
|
||||
|
||||
function Mod() {}
|
||||
|
||||
Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, ext, uobject, search, defaultpage, users, page404, head, foot, fd, elseCallback, configJSON, callServerError, getCustomHeaders, origHref, redirect, parsePostData) {
|
||||
|
@ -231,8 +239,9 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
|
|||
req.socket.localPort,
|
||||
getCustomHeaders ?
|
||||
getCustomHeaders()["Server"] +
|
||||
(disableModExposeSupported && (configJSON.exposeModsInErrorPages || configJSON.exposeModsInErrorPages === undefined) ?
|
||||
" OrangeCircle/" +
|
||||
version :
|
||||
version : "") :
|
||||
"SVR.JS/" +
|
||||
configJSON.version +
|
||||
" (" +
|
||||
|
|
4
mod.info
4
mod.info
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"name": "DorianTech OrangeCircle SCGI client for SVR.JS",
|
||||
"version": "1.0.7"
|
||||
"name": "OrangeCircle SCGI client for SVR.JS",
|
||||
"version": "1.1.0"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue