Add SERVER_ADMIN environment variable support
This commit is contained in:
parent
1bef9ee09c
commit
4829078b00
2 changed files with 4 additions and 1 deletions
3
index.js
3
index.js
|
@ -190,6 +190,9 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
|
||||||
nEnv["SERVER_ADDR"] = pubip.replace(/^::ffff:/i, "");
|
nEnv["SERVER_ADDR"] = pubip.replace(/^::ffff:/i, "");
|
||||||
if (nEnv["SERVER_ADDR"].indexOf(":") != -1) nEnv["SERVER_ADDR"] = "[" + nEnv["SERVER_ADDR"] + "]";
|
if (nEnv["SERVER_ADDR"].indexOf(":") != -1) nEnv["SERVER_ADDR"] = "[" + nEnv["SERVER_ADDR"] + "]";
|
||||||
}
|
}
|
||||||
|
if(configJSON.serverAdministratorEmail && configJSON.serverAdministratorEmail != "[no contact information]") {
|
||||||
|
nEnv["SERVER_ADMIN"] = configJSON.serverAdministratorEmail;
|
||||||
|
}
|
||||||
nEnv["SERVER_NAME"] = req.headers.host;
|
nEnv["SERVER_NAME"] = req.headers.host;
|
||||||
nEnv["DOCUMENT_ROOT"] = process.cwd();
|
nEnv["DOCUMENT_ROOT"] = process.cwd();
|
||||||
nEnv["SCRIPT_NAME"] = scgiConf.path;
|
nEnv["SCRIPT_NAME"] = scgiConf.path;
|
||||||
|
|
2
mod.info
2
mod.info
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"name": "DorianTech OrangeCircle SCGI client for SVR.JS",
|
"name": "DorianTech OrangeCircle SCGI client for SVR.JS",
|
||||||
"version": "1.0.4"
|
"version": "1.0.5"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue