mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-29 03:28:29 +01:00
parent
57d994db0c
commit
158dd49b3d
1 changed files with 1 additions and 0 deletions
|
@ -19,6 +19,7 @@ export async function proxyMedia(ctx: Koa.Context) {
|
||||||
|
|
||||||
const { mime, ext } = await detectType(path);
|
const { mime, ext } = await detectType(path);
|
||||||
|
|
||||||
|
if (!mime.startsWith('image/')) throw 403;
|
||||||
if (!FILE_TYPE_BROWSERSAFE.includes(mime)) throw 403;
|
if (!FILE_TYPE_BROWSERSAFE.includes(mime)) throw 403;
|
||||||
|
|
||||||
let image: IImage;
|
let image: IImage;
|
||||||
|
|
Loading…
Reference in a new issue