Merge pull request #20 from 193s/pr-01-usecdn
bugfix: useCDN option must be passed to ejs_renderer
This commit is contained in:
commit
05b28044e4
1 changed files with 7 additions and 4 deletions
|
@ -50,7 +50,8 @@ function responseError(res, code, detail, msg) {
|
||||||
filename: template,
|
filename: template,
|
||||||
code: code,
|
code: code,
|
||||||
detail: detail,
|
detail: detail,
|
||||||
msg: msg
|
msg: msg,
|
||||||
|
useCDN: config.usecdn
|
||||||
});
|
});
|
||||||
res.write(content);
|
res.write(content);
|
||||||
res.end();
|
res.end();
|
||||||
|
@ -96,7 +97,8 @@ function responseHackMD(res, noteId) {
|
||||||
};
|
};
|
||||||
var compiled = ejs.compile(fs.readFileSync(template, 'utf8'), options);
|
var compiled = ejs.compile(fs.readFileSync(template, 'utf8'), options);
|
||||||
var html = compiled({
|
var html = compiled({
|
||||||
title: title
|
title: title,
|
||||||
|
useCDN: config.usecdn
|
||||||
});
|
});
|
||||||
var buf = html;
|
var buf = html;
|
||||||
res.writeHead(200, {
|
res.writeHead(200, {
|
||||||
|
@ -190,7 +192,8 @@ function showPublishNote(req, res, next) {
|
||||||
viewcount: note.viewcount,
|
viewcount: note.viewcount,
|
||||||
updatetime: updatetime,
|
updatetime: updatetime,
|
||||||
url: origin,
|
url: origin,
|
||||||
body: text
|
body: text,
|
||||||
|
useCDN: config.usecdn
|
||||||
});
|
});
|
||||||
var buf = html;
|
var buf = html;
|
||||||
res.writeHead(200, {
|
res.writeHead(200, {
|
||||||
|
|
Loading…
Reference in a new issue