Revert "Deprecated Referer
checking for hotlink prevention in favour of token verification system"
Might not be a good idea to fully remove it right now...
This commit is contained in:
parent
c1d459fa7e
commit
01b9e6adab
|
@ -11,7 +11,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- [2020-07-04] Changed GitLab CI to build on every push irregardless of tagging by [@carbotaniuman].
|
- [2020-07-04] Changed GitLab CI to build on every push irregardless of tagging by [@carbotaniuman].
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
- [2020-07-05] Deprecated `Referer` checking for hotlink prevention in favour of token verification system by [@lflare].
|
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,10 @@ class ImageServer(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (snapshot != null && imageDatum != null) {
|
if (request.header("Referer")?.startsWith("https://mangadex.org") == false) {
|
||||||
|
snapshot?.close()
|
||||||
|
Response(Status.FORBIDDEN)
|
||||||
|
} else if (snapshot != null && imageDatum != null) {
|
||||||
request.handleCacheHit(sanitizedUri, getRc4(rc4Bytes), snapshot, imageDatum)
|
request.handleCacheHit(sanitizedUri, getRc4(rc4Bytes), snapshot, imageDatum)
|
||||||
} else {
|
} else {
|
||||||
if (snapshot != null) {
|
if (snapshot != null) {
|
||||||
|
|
Loading…
Reference in a new issue