mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
set correct content type for error messages
This commit is contained in:
@@ -48,7 +48,9 @@ function downloadNoteFile(noteId, res, contentDisposition = true) {
|
||||
const note = becca.getNote(noteId);
|
||||
|
||||
if (!note) {
|
||||
return res.status(404).send(`Note ${noteId} doesn't exist.`);
|
||||
return res.setHeader("Content-Type", "text/plain")
|
||||
.status(404)
|
||||
.send(`Note ${noteId} doesn't exist.`);
|
||||
}
|
||||
|
||||
if (note.isProtected && !protectedSessionService.isProtectedSessionAvailable()) {
|
||||
|
||||
Reference in New Issue
Block a user