fix: Ensure font serving does not reflect userdata-derived errors as HTML (#647)

* fix: ensure font serving does not reflect userdata-derived errors as HTML

Signed-off-by: Michael Nutt <michael@nuttnet.net>
This commit is contained in:
Michael Nutt
2022-11-24 11:07:11 -05:00
committed by GitHub
parent c134795b81
commit a7af45ee3f
5 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ export const serve_font = (options, allowedFonts) => {
res.header('Last-Modified', lastModified);
return res.send(concated);
},
(err) => res.status(400).send(err),
(err) => res.status(400).header('Content-Type', 'text/plain').send(err),
);
});