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)
if (request.header("Referer")?.startsWith("https://mangadex.org") == true) {
if (request.header("Referer")?.startsWith("https://mangadex.org") == false) {
snapshot?.close()
Response(Status.FORBIDDEN)
} else if (snapshot != null && imageDatum != null) {