1
0
Fork 1
mirror of https://gitlab.com/mangadex-pub/mangadex_at_home.git synced 2024-01-19 02:48:37 +00:00

Merge branch 'referer-check' into 'master'

fixed referer-check

Closes #64

See merge request mangadex-pub/mangadex_at_home!49
This commit is contained in:
carbotaniuman 2020-07-02 21:23:14 +00:00
commit ac324a7dd2

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) {