diff --git a/src/main/kotlin/mdnet/base/server/ImageServer.kt b/src/main/kotlin/mdnet/base/server/ImageServer.kt index dc7c633..dfe3b51 100644 --- a/src/main/kotlin/mdnet/base/server/ImageServer.kt +++ b/src/main/kotlin/mdnet/base/server/ImageServer.kt @@ -105,6 +105,10 @@ class ImageServer(private val cache: DiskLruCache, private val statistics: Atomi handled.set(true) if (referer != null && !referer.startsWith("https://mangadex.org")) { + if (snapshot != null) { + snapshot.close() + } + Response(Status.FORBIDDEN) } else if (snapshot != null && imageDatum != null) { request.handleCacheHit(sanitizedUri, getRc4(rc4Bytes), snapshot, imageDatum)