feat(share): allow serving raw file via query parameter (closes #1182)

This commit is contained in:
Elian Doran 2025-02-13 21:28:01 +02:00
parent 4b597c5d2c
commit 6e17346768
No known key found for this signature in database

View File

@ -143,7 +143,7 @@ function register(router: Router) {
addNoIndexHeader(note, res);
if (note.isLabelTruthy("shareRaw")) {
if (note.isLabelTruthy("shareRaw") || typeof req.query.raw !== "undefined") {
res.setHeader("Content-Type", note.mime).send(note.getContent());
return;