diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-12-26 17:01:09 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-12-26 17:01:09 +0100 |
commit | e32d7fd4c1f3fdc298453d3182d5eec49736f1f3 (patch) | |
tree | 0244f27ed603b2be1fdebc3fe0404fa87b3c66a4 | |
parent | 739e359fb394b8710734e0eb92eccadc19ba0f51 (diff) |
Explicitly serve hostname
-rwxr-xr-x | serverstore.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/serverstore.js b/serverstore.js index 21876ee..1d04530 100755 --- a/serverstore.js +++ b/serverstore.js @@ -8,7 +8,7 @@ var fs=require("fs"), Persist=require("node-persist"), glob=require("glob"); -var HTTPPORT=42420; +var HOSTNAME="tomsmeding.com",HTTPPORT=42420; Persist.initSync({}); @@ -97,7 +97,7 @@ app.post("/ss/image/:userid/:authhash/:fname",function(req,res){ fs.mkdirSync("images/"+req.ssuser[0]); } fs.writeFileSync("images/"+req.ssuser[0]+"/"+req.ssfname,req.body); - res.end("http://"+req.hostname+"/ss/get/"+req.ssuser[0]+"/"+req.sscode); + res.end("https://"+HOSTNAME+"/ss/get/"+req.ssuser[0]+"/"+req.sscode); }); |