summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackycute2015-09-23 10:24:38 +0800
committerjackycute2015-09-23 10:24:38 +0800
commit05b28044e40fc2bb7f3e2b3e7e13425038b889f2 (patch)
tree229852d801d1e2978d489292fffff8364515afc8
parenta29cc7ceecae5dd1d0e4ec0df7494ed023acb06e (diff)
parent7fc7325f8722096360937bab3164156fedccb7b9 (diff)
Merge pull request #20 from 193s/pr-01-usecdn
bugfix: useCDN option must be passed to ejs_renderer
Diffstat (limited to '')
-rw-r--r--lib/response.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/response.js b/lib/response.js
index 1f7fbd54..38e01c1b 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -50,7 +50,8 @@ function responseError(res, code, detail, msg) {
filename: template,
code: code,
detail: detail,
- msg: msg
+ msg: msg,
+ useCDN: config.usecdn
});
res.write(content);
res.end();
@@ -96,7 +97,8 @@ function responseHackMD(res, noteId) {
};
var compiled = ejs.compile(fs.readFileSync(template, 'utf8'), options);
var html = compiled({
- title: title
+ title: title,
+ useCDN: config.usecdn
});
var buf = html;
res.writeHead(200, {
@@ -190,7 +192,8 @@ function showPublishNote(req, res, next) {
viewcount: note.viewcount,
updatetime: updatetime,
url: origin,
- body: text
+ body: text,
+ useCDN: config.usecdn
});
var buf = html;
res.writeHead(200, {
@@ -360,4 +363,4 @@ function publishNoteActions(req, res, next) {
}
}
-module.exports = response; \ No newline at end of file
+module.exports = response;