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": "*/*",
"accept-encoding": "gzip", "accept-encoding": "gzip",
"accept-language": "en-US,en;q=0.9", "accept-language": "en-US,en;q=0.9",
"connection": "keep-alive",
"content-type": "application/json", "content-type": "application/json",
"origin": "https://x.com", "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", "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-active-user": "yes",
"x-twitter-client-language": "en", "x-twitter-client-language": "en",
"priority": "u=1, i" "priority": "u=1, i"
}) }, titleCase=true)
case session.kind case session.kind
of SessionKind.oauth: of SessionKind.oauth:

View file

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