From 7fc7325f8722096360937bab3164156fedccb7b9 Mon Sep 17 00:00:00 2001
From: Ikumi Shimizu <193s@users.noreply.github.com>
Date: Tue, 22 Sep 2015 23:39:13 +0900
Subject: [PATCH] fixed a bug in response.js:useCdn

---
 lib/response.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/response.js b/lib/response.js
index 1f7fbd5..38e01c1 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;