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

Deprecated Referer checking for hotlink prevention in favour of token verification system

This commit is contained in:
Amos Ng 2020-07-06 04:11:44 +08:00
parent 086dcdc43f
commit c8059eae03
No known key found for this signature in database
GPG key ID: 89086414F634D123
2 changed files with 2 additions and 4 deletions

View file

@ -11,6 +11,7 @@ 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

View file

@ -135,10 +135,7 @@ class ImageServer(
} }
} }
if (request.header("Referer")?.startsWith("https://mangadex.org") == false) { if (snapshot != null && imageDatum != null) {
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) {