mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
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")
|
val referer = request.header("Referer")
|
||||||
|
|
||||||
handled.set(true)
|
handled.set(true)
|
||||||
if (referer != null && !referer.contains("mangadex.org")) {
|
if (referer != null && !referer.startsWith("https://mangadex.org")) {
|
||||||
Response(Status.FORBIDDEN)
|
Response(Status.FORBIDDEN)
|
||||||
} else if (snapshot != null && imageDatum != null) {
|
} else if (snapshot != null && imageDatum != null) {
|
||||||
request.handleCacheHit(sanitizedUri, getRc4(rc4Bytes), snapshot, imageDatum)
|
request.handleCacheHit(sanitizedUri, getRc4(rc4Bytes), snapshot, imageDatum)
|
||||||
|
|
Loading…
Reference in a new issue