Fix CF block

This commit is contained in:
Zed 2026-08-19 02:39:25 +07:00
commit 28b55a5017
2 changed files with 2 additions and 3 deletions

View file

@ -69,14 +69,13 @@ proc genHeaders*(session: Session, url: Uri, skipTid: bool): Future[HttpHeaders]
"accept": "*/*",
"accept-encoding": "gzip",
"accept-language": "en-US,en;q=0.9",
"connection": "keep-alive",
"content-type": "application/json",
"origin": "https://x.com",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36",
"x-twitter-active-user": "yes",
"x-twitter-client-language": "en",
"priority": "u=1, i"
})
}, titleCase=true)
case session.kind
of SessionKind.oauth:

View file

@ -27,7 +27,7 @@ proc release*(pool: HttpPool; client: AsyncHttpClient; badClient=false) =
proc acquire*(pool: HttpPool; heads: HttpHeaders): AsyncHttpClient =
if pool.conns.len == 0:
result = newAsyncHttpClient(headers=heads, proxy=proxy)
result = newAsyncHttpClient(userAgent="", headers=heads, proxy=proxy)
else:
result = pool.conns.pop()
result.headers = heads