diff --git a/src/index.ts b/src/index.ts index 92394e5..c1d6172 100644 --- a/src/index.ts +++ b/src/index.ts @@ -84,6 +84,9 @@ media.get( if (!FUCKED_UP_SERVERS.includes(serverName)) { file = await got.get(`${DEST_SERVER}/_matrix/media/r0/download/${serverName}/${mediaId}`, { responseType: 'buffer', + headers: { + Authorization: ctx.headers['authorization'], + }, }); if (file && file.statusCode === 200) { sendFile(file); @@ -133,6 +136,9 @@ media.get('/thumbnail/:serverName/:mediaId', async (ctx) => { `https://${remoteHost}/_matrix/media/r0/download/${serverName}/${mediaId}`, { responseType: 'buffer', + headers: { + Authorization: ctx.headers['authorization'], + }, }, ); }