diff options
author | Cheng-Han, Wu | 2016-02-01 00:41:28 -0600 |
---|---|---|
committer | Cheng-Han, Wu | 2016-02-01 00:41:28 -0600 |
commit | 1fb42bd276ff6806d733c2449a10840ae29903a9 (patch) | |
tree | 4c344f94063ccebf06485e308cbef948ffd8c50e /lib | |
parent | dcebc75d397f42cd3b3c9400f3217b621466aed6 (diff) |
Updated to allow CORS in download as API
Diffstat (limited to '')
-rw-r--r-- | lib/response.js | 1 |
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', |