[backend/drive] Don't proxy requests for local emoji

This commit is contained in:
Laura Hausmann 2025-01-10 10:24:47 +01:00
parent 6b17623cfd
commit 5d7020faeb
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -51,7 +51,7 @@ public class DriveController(
var emoji = await db.Emojis.FirstOrDefaultAsync(p => p.Id == id)
?? throw GracefulException.NotFound("Emoji not found");
if (!options.Value.ProxyRemoteMedia)
if (!options.Value.ProxyRemoteMedia || emoji.Host == null)
return Redirect(emoji.RawPublicUrl);
return await ProxyAsync(emoji.RawPublicUrl, null, null);