1
0
Fork 0
mirror of https://github.com/SunRed/haste-server.git synced 2024-11-01 01:30:21 +01:00

Set Content-Type of raw paste to plaintext

This commit is contained in:
Manuel 2021-02-14 20:19:19 +00:00
parent 592e484d35
commit f93aac983a
Signed by: Manuel
GPG key ID: 4085037435E1F07A

View file

@ -81,6 +81,7 @@ const utils = new HasteUtils();
app.get('/raw/:id', async (req, res) => {
const key = req.params.id.split('.')[0];
const skipExpire = Boolean(config.documents[key]);
res.setHeader('content-type', 'text/plain');
return await documentHandler.handleGetRaw(key, res, skipExpire);
});