summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2015-11-17 01:19:01 +0800
committerWu Cheng-Han2015-11-17 01:19:01 +0800
commit75ae505a1544d8999e6705aad7ed96ff5a6eb0e5 (patch)
tree366c5002ba743b386bace33d7f2f98b1465d413f
parentf307ce5babe14973274154386ebd82503cc605f0 (diff)
Updated response.js, the render url now using config getserverurl()
Diffstat (limited to '')
-rw-r--r--lib/response.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/response.js b/lib/response.js
index 38e01c1b..486a1f76 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -186,7 +186,7 @@ function showPublishNote(req, res, next) {
filename: template
};
var compiled = ejs.compile(fs.readFileSync(template, 'utf8'), options);
- var origin = "//" + req.headers.host;
+ var origin = config.getserverurl();
var html = compiled({
title: title,
viewcount: note.viewcount,
@@ -246,7 +246,7 @@ function actionPretty(req, res, noteId) {
title = Note.generateWebTitle(title);
var template = config.prettypath;
var compiled = ejs.compile(fs.readFileSync(template, 'utf8'));
- var origin = "//" + req.headers.host;
+ var origin = config.getserverurl();
var html = compiled({
title: title,
url: origin,