bruh moment

This commit is contained in:
Blatzar 2021-12-19 15:00:09 +01:00
parent e118938a41
commit ed020eb5b6
2 changed files with 3 additions and 3 deletions

View file

@ -42,9 +42,9 @@ class DdosGuardKiller(private val alwaysBypass: Boolean) : Interceptor {
app.get(it, cacheTime = 0).cookies.also { 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(
request.newBuilder()
.headers(headers)

View file

@ -147,7 +147,7 @@ fun getHeaders(
val cookieHeaders = (DEFAULT_COOKIES + cookie)
val cookieMap =
if (cookieHeaders.isNotEmpty()) mapOf(
"Cookie" to cookieHeaders.entries.joinToString("") {
"Cookie" to cookieHeaders.entries.joinToString(" ") {
"${it.key}=${it.value};"
}) else mapOf()
val tempHeaders = (DEFAULT_HEADERS + headers + cookieMap + refererMap)