mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 11:40:49 +00:00
image以外はproxyしないように (#5051)
This commit is contained in:
@@ -17,6 +17,8 @@ export async function proxyMedia(ctx: Koa.BaseContext) {
|
||||
|
||||
const [type, ext] = await detectMine(path);
|
||||
|
||||
if (!type.startsWith('image/')) throw 403;
|
||||
|
||||
let image: IImage;
|
||||
|
||||
if ('static' in ctx.query && ['image/png', 'image/gif'].includes(type)) {
|
||||
|
||||
Reference in New Issue
Block a user