Add SERVER_ADMIN environment variable support

This commit is contained in:
Dorian Niemiec 2023-08-27 09:30:24 +02:00
parent 1bef9ee09c
commit 4829078b00
2 changed files with 4 additions and 1 deletions

View file

@ -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;

View file

@ -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"
} }