fixed referer-check

This commit is contained in:
wedge1001 2020-07-02 21:40:49 +02:00
parent 75749ea685
commit 62f0d4fa2e

View file

@ -106,7 +106,7 @@ class ImageServer(private val cache: DiskLruCache, private val statistics: Atomi
} }
handled.set(true) handled.set(true)
if (request.header("Referer")?.startsWith("https://mangadex.org") == true) { if (request.header("Referer")?.startsWith("https://mangadex.org") == false) {
snapshot?.close() snapshot?.close()
Response(Status.FORBIDDEN) Response(Status.FORBIDDEN)
} else if (snapshot != null && imageDatum != null) { } else if (snapshot != null && imageDatum != null) {