fix (backend): set X-Content-Type-Options to nosniff on the drive files endpoint

This commit is contained in:
Laura Hausmann 2024-04-01 03:21:41 +09:00 committed by naskya
parent 9086ef11ff
commit 88ca0e1621
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -54,6 +54,8 @@ export default async function (ctx: Koa.Context) {
return;
}
ctx.set("X-Content-Type-Options", "nosniff");
const isThumbnail = file.thumbnailAccessKey === key;
const isWebpublic = file.webpublicAccessKey === key;