Check for mangadex.org prefix rather than checking if referer contains
string
This commit is contained in:
parent
00e4ac20bb
commit
d24c061cc6
|
@ -104,7 +104,7 @@ class ImageServer(private val cache: DiskLruCache, private val statistics: Atomi
|
|||
val referer = request.header("Referer")
|
||||
|
||||
handled.set(true)
|
||||
if (referer != null && !referer.contains("mangadex.org")) {
|
||||
if (referer != null && !referer.startsWith("https://mangadex.org")) {
|
||||
Response(Status.FORBIDDEN)
|
||||
} else if (snapshot != null && imageDatum != null) {
|
||||
request.handleCacheHit(sanitizedUri, getRc4(rc4Bytes), snapshot, imageDatum)
|
||||
|
|
Loading…
Reference in a new issue