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',