Updated to allow CORS in download as API
This commit is contained in:
parent
dcebc75d39
commit
1fb42bd276
1 changed files with 1 additions and 0 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue