Sun Jul 21 15:45:52 CST 2019 Source Update...

This commit is contained in:
2019-07-21 15:45:52 +08:00
parent 081044155c
commit 8e1a78e586
6 changed files with 71 additions and 17 deletions

View File

@@ -91,7 +91,7 @@ require("../core/transaction-validator");
global.STAT_MODE = 1;
setInterval(PrepareStatEverySecond, 1000);
var IndexName = "index.html";
if(global.HTTPS_HOSTING_DOMAIN)
if(global.HTTPS_HOSTING_DOMAIN && HTTP_HOSTING_PORT === 443)
{
var file_sert = GetDataPath("sertif.lst");
CheckCreateDir(GetDataPath("tmp"));
@@ -353,6 +353,28 @@ function DoCommandNew(response,Type,Path,Params)
Method = Method.toLowerCase();
if(Method === "dapp" && ArrPath.length === 2)
Method = "DappTemplateFile";
if(HTTPS_HOSTING_DOMAIN === "terafoundation.org")
{
if(Method === "map.html")
{
response.writeHead(301, {"Location":'http://teraexplorer.org/map.html'});
return response.end();
}
else
if(Method === "explorer.html")
{
response.writeHead(301, {"Location":'http://teraexplorer.org'});
return response.end();
}
else
if(Method === "DappTemplateFile")
{
if(Path.substr(0, 1) !== "/")
Path = "/" + Path;
response.writeHead(301, {"Location":'http://terawallet.org' + Path});
return response.end();
}
}
switch(Method)
{
case "index.html":
@@ -369,6 +391,7 @@ function DoCommandNew(response,Type,Path,Params)
break;
case "client":
DappClientCodeFile(response, ArrPath[1]);
break;
default:
{
var Name = ArrPath[ArrPath.length - 1];