diff --git a/index.js b/index.js index 1fac2fe..b7a9ca4 100644 --- a/index.js +++ b/index.js @@ -126,6 +126,10 @@ fastify.get('/s/:date/:filename', async (request, reply) => { \n`; if (mimeType.startsWith('image/')) { + //If the user agent is DiscordBot, return the image directly + if (request.headers['user-agent'].includes('Discordbot')) { + return reply.redirect(`/f/${joinedPath}`); + } fileContent = `${filename}` ogTags += `