batcave: remove cross origin referer (#8625)
This commit is contained in:
parent
83631d067e
commit
ee29f284f5
@ -1,7 +1,7 @@
|
||||
ext {
|
||||
extName = 'BatCave'
|
||||
extClass = '.BatCave'
|
||||
extVersionCode = 3
|
||||
extVersionCode = 4
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
@ -222,6 +222,16 @@ class BatCave : HttpSource() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun imageRequest(page: Page): Request {
|
||||
val imageHeaders = headersBuilder().apply {
|
||||
if (!page.imageUrl!!.toHttpUrl().host.contains("batcave")) {
|
||||
removeAll("Referer")
|
||||
}
|
||||
}.build()
|
||||
|
||||
return GET(page.imageUrl!!, imageHeaders)
|
||||
}
|
||||
|
||||
override fun imageUrlParse(response: Response): String {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user