summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-02-01 00:41:28 -0600
committerCheng-Han, Wu2016-02-01 00:41:28 -0600
commit1fb42bd276ff6806d733c2449a10840ae29903a9 (patch)
tree4c344f94063ccebf06485e308cbef948ffd8c50e /lib
parentdcebc75d397f42cd3b3c9400f3217b621466aed6 (diff)
Updated to allow CORS in download as API
Diffstat (limited to '')
-rw-r--r--lib/response.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/response.js b/lib/response.js
index daf5fb11..07cb5ba9 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -324,6 +324,7 @@ function actionDownload(req, res, noteId) {
var body = LZString.decompressFromBase64(data.rows[0].content);
var title = Note.getNoteTitle(body);
res.writeHead(200, {
+ 'Access-Control-Allow-Origin': '*', //allow CORS as API
'Content-Type': 'text/markdown; charset=UTF-8',
'Cache-Control': 'private',
'Content-disposition': 'attachment; filename=' + title + '.md',