mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
bruh moment
This commit is contained in:
parent
e118938a41
commit
ed020eb5b6
2 changed files with 3 additions and 3 deletions
|
@ -42,9 +42,9 @@ class DdosGuardKiller(private val alwaysBypass: Boolean) : Interceptor {
|
||||||
app.get(it, cacheTime = 0).cookies.also { cookies ->
|
app.get(it, cacheTime = 0).cookies.also { cookies ->
|
||||||
savedCookiesMap[request.url.host] = cookies
|
savedCookiesMap[request.url.host] = cookies
|
||||||
}
|
}
|
||||||
} + request.cookies
|
}
|
||||||
|
|
||||||
val headers = getHeaders(request.headers.toMap(), null, cookies)
|
val headers = getHeaders(request.headers.toMap(), null, cookies + request.cookies)
|
||||||
return app.baseClient.newCall(
|
return app.baseClient.newCall(
|
||||||
request.newBuilder()
|
request.newBuilder()
|
||||||
.headers(headers)
|
.headers(headers)
|
||||||
|
|
|
@ -147,7 +147,7 @@ fun getHeaders(
|
||||||
val cookieHeaders = (DEFAULT_COOKIES + cookie)
|
val cookieHeaders = (DEFAULT_COOKIES + cookie)
|
||||||
val cookieMap =
|
val cookieMap =
|
||||||
if (cookieHeaders.isNotEmpty()) mapOf(
|
if (cookieHeaders.isNotEmpty()) mapOf(
|
||||||
"Cookie" to cookieHeaders.entries.joinToString("") {
|
"Cookie" to cookieHeaders.entries.joinToString(" ") {
|
||||||
"${it.key}=${it.value};"
|
"${it.key}=${it.value};"
|
||||||
}) else mapOf()
|
}) else mapOf()
|
||||||
val tempHeaders = (DEFAULT_HEADERS + headers + cookieMap + refererMap)
|
val tempHeaders = (DEFAULT_HEADERS + headers + cookieMap + refererMap)
|
||||||
|
|
Loading…
Reference in a new issue